Decay or other
Decay can lead to sense from hot/cold but you can have decay and not have the sense as well.
Another possibility is you may have a necrotic (dead) tooth that is causing inflammatoin and pain is derived from the bone. Tooth would need a root canal
if that were the case. See your dentist for care.