As you age, the enamel on teeth wears out, which allows the dentin to show through. Dentin is an inner layer of your tooth underneath the enamel. It's yellowish in color and is responsible for sending signals to the brain about temperature changes caused by hot or cold food items. When exposed to heat or cold, it causes nerve endings to send pain signals to the brain, which can lead to inflammation around the gums, known as sensitivity.
This could mean that there is a cavity on one of your teeth, and it should be treated as soon as possible. If you're experiencing any pain or sensitivity in your teeth, please visit your dentist as soon as possible. Early diagnosis and treatment can prevent further damage to your teeth.