Were you trying to use coconut oil as a hair mask, or an overnight treatment, or...? And then you just forgot to wash it out after?
Maybe try soaking your hair in hot water (as hot as you can tolerate) and then attempt detangling (starting with your fingers). My thinking is, since coconut oil...