Possible problem: If this discomfort lasts only moments, sensitivity to hot and cold foods generally does not signal a serious problem. The sensitivity may be caused by a small decay, a loose filling or by minimal gum recession that exposes small areas of the root surface.
What to do: Try using toothpastes made for sensitive teeth. Brush up and down with a soft brush; brushing sideways wears away exposed root surfaces. If this is unsuccessful, see your general dentist. If the sensitivity is coming from a decay you should see your general dentist.