What’s the main cause for diaper rash

I have a 1 year old who’s never had diaper rash ever and then I got him home from daycare which he’s been attending since 5 months old and I got him home yesterday went to change him he’s entire bottom was so red and even his little balls so I was mad and didn’t understand how this can happen so I put cream on every hour all night it was starting to clear up took him to daycare they said he slept through his last diaper change I decided to let it go I haven’t had problems before but said he needed the cream every diaper change picked him up they said they did it every change and got him home it looks terrible all over again after it was clearing up in the morning I don’t understand what can be causing this?