At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
Well, if you simply look at the properties of each state, it's quite easy to decide.
Solids keep their shape no matter what container they are placed in.
Liquids move to fill out the container they are placed in, and are rather affected by gravity, so it will stay, or move towards the bottom of the container first.
Gases have less density, so basically, they aren't nearly as affected by gravity as liquids and solids are. They move to fill out the container as well, but they spread more equally, and do no conglomerate or anything.
There are two approaches, the macroscopic and the microscopic (using atomic theory):
Macroscopically, the distinction is how they respond to forces of compression and torsion (twisting). Gases can be easily compressed or twisted without resisting. Liquids strongly resist compression, but they can be twisted relatively easily, without resisting. Solids strongly resist both compression and twisting.
Microscopically, there are two distinctions: the density and whether the atoms appear on patterns. Liquids and solids tend to have the maximum possible density, meaning the atoms or molecules are essentially touching in them. Gases have a much lower density. In solids the atoms or molecules tend to be in regular patterns (a crystal), whereas in gases or liquids they do not.
This skips over a number of subtleties, but it will do as a first pass.