As the temperature of a liquid is lowered, the molecules slow down and become more closely packed together. The attractive forces between the molecules, such as hydrogen bonds, van der Waals forces, and ionic bonds, become stronger and start to overcome the kinetic energy of the molecules, which is the energy of their motion.
When the attractive forces become strong enough to overcome the kinetic energy, the molecules are no longer able to move freely and they become locked into a fixed position. This is what causes the liquid to change into a solid. The solid phase has a definite shape and volume, and the molecules are arranged in a regular pattern.
The freezing point of a liquid is the temperature at which the liquid and solid phases are in equilibrium. At this temperature, the rate of freezing is equal to the rate of melting, and there is no net change in the amount of solid and liquid phases.