You should always make sure to use an oil to protect your hair from damage due to (combing, brushing, etc). Mineral/silicone/sunflower (other vegetable) oils can also be used to reduce damage and protect your hair.
Most oils only work on the outermost layer of the hair, which is already great and by sticking to the outermost layer, oils can reduce friction and smoothen the cuticles. This helps to comb your hair easily.
If an oil wants to penetrate into the hair shaft or hair core, it needs to have enough affinity with the inner surface and the molecular weight or size also needs to be small enough to penetrate/diffuse inside the hair shaft.
Coconut oil, being a triglyceride of lauric acid (principal fatty acid), has a high affinity for hair proteins and, because of its low molecular weight and straight linear chain, is able to penetrate inside the hair shaft. Mineral oil or hydrocarbon, for example, has no affinity for proteins and is therefore not able to penetrate into the hair shaft. Sunflower oil, because of its bulky structure does not penetrate into the fibre.
So what is the advantage of coconut oil penetrating deeper into the hair?
Coconut oil reinforces the lipid layer of the outermost surface, by filling in the gaps between the cuticle cells. This helps to build resistance against (so that they cannot penetrate into the hair shaft) foreign substances such as surfactants which can damage the lipids and proteins from the hair.
Apply it at least one hour before showering, or the night before which is even better. Coconut oil is more effective as a prewash, but can also be used as a post-wash.
You want your hair to be hydrophobic, so it repels water (water is not good for the hair). Oiling makes the hair more hydrophobic, and this effect is more pronounced for oils that penetrate deeper into the hair core.
Water makes your hair swell and swollen hair is more vulnerable and prone to damage. Other oils also help to decrease the swelling of your hair but penetrating oils are even better at it.