The closeness of molecules is what determines the substance's state of matter (Solid, Liquid, or Gas). When they are condensed and vibrate slowly, they are solids, when they move a bit freely, they are Liquid, and Gases have their molecules rapidly running around within their composition. Heat can impact the speed of molecules and is the main reason for this.