The characteristic that makes these materials solid or liquid at room temperature is the ability for the molecules to pack close together and Van der Waals forces. Oils or fats made up of mostly saturated fatty acids are able to pack very close together and produce a regular structure.
Why does oil Harden?
The oil hardens through a chemical reaction in which the components crosslink (and hence, polymerize) by the action of oxygen (not through the evaporation of water or other solvents). Drying oils are a key component of oil paint and some varnishes.
Why does oil turn solid in the fridge?
Every fat or oil will turn from liquid to solid -- that is, freeze -- at some temperature or other. That's why refrigerated cooking oils can turn cloudy if the temperature, usually about 40 degrees, is lower than the oil's freezing point. ... So some may freeze and make the oil cloudy, while others may not.