coconut oil is a mixture of saturated, monounsaturated and polyunsaturated fatty acids.
saturated fatty acids have higher melting point compared to the unsaturated ones.
Coconut is mainly saturated fatty acid. It solidifies at lower temperature.
Compare it to an olive oil which is mainly unsaturated fatty acids that doesn't solidify at colder temperature.