I have a friend who used to have an iphone but has since gotten another phone. When I go to text him it automatically does an imessage which fails. I've deleted him and re-added him. I've turned imessage off and it will work for a bit but eventually reverts back to imessage. What do I do to fix this?
Nothing. If your friend hasn't deactivated iMessage before he sold/lost his iPhone, then Apple still thinks that he has an iPhone and is using iMessage.
He has to deactivate iMessage. Here is the Apple Support site for this.
Bun in short: He has to contact Apple Support to do this.
Or, when he/she still has his/her iPhone, then go to Settings > Messages and switch off iMessage.