Plumbing Blasting Hot Water

Hi, I’m getting sudden bursts of very hot water in the middle of a shower. I have a gas water heater. The pilot light is on. Any ideas why this is happening? Thank you!