Coconut oil penetrates into the cuticle of the hair - this can help to strengthen the hair (like protein) but it can also make the hair dry and brittle.
Coconut oil is also affected by the temperature. As it turns into a solid at room temperature, it has been known to harden in peoples hair.
I like to use coconut oil before I shampoo my hair to protect my strands from absorbing too much water.
Check out the curl chemists' article on Coconut oil vs mineral oil for more information: Mineral Oil Versus Coconut Oil: Which is better? | NaturallyCurly.com