You can use coconut oil in different ways to benefit the hair. One common approach is to apply it as a pre-shampoo treatment by massaging the oil onto the hair and scalp. Then you can leave it for 30 minutes to an hour before washing it off with a gentle shampoo. Another option is to apply coconut oil as a leave-in conditioner to add shine and smoothness to the hair.