Pressure and temperature directly affect whether an atom will be in a gas, liquid or solid state. Heating matter speeds up the atom's rate of motion, increasing the distance between atoms. Heat a piece of matter above a certain temperature, and that matter will change its phase from solid to liquid. An ice cube melting, for example, exhibits this rate of transformation. Heat a liquid past a certain point, and that liquid will evaporate into a gas, changing the state of the atom once again.
Atoms reach a solid state when the chemical bonds are stronger than the outside energy acting on the atom. Atoms in a solid maintain motion, but it is limited to vibrations. The atoms do not move past or away from one another but stay in a locked positions, pulsating next to one another.
Atoms in the liquid state have enough kinetic energy applied to them to overcome chemical bonds and break down the solid state, but most molecules in this state must maintain connection with other atoms. Atoms move past each other and frequently bump into one another, but they don't move far from each other like gaseous atoms do. Thus liquids exhibit molecular structures similar to solids.
A gas phase is reached when the pressure and temperature energies surpass the atom's attractive forces. Atoms in a gaseous state fly off in all directions, periodically colliding with one another because of their free range of motion.