Nappy rash

My son has a really bad nappy rash and he is having diarrhea. What can I use for him and what to do. He cries whenever I am cleaning him up