My upper right tooth (before wisdome tooth) hurts when I drink hot or cold fluids?

Cavity ? More than likely you have a cavity. It could be sensitive due to grinding your teeth too much but dont get too optomistic. More than likely it is a cavity and if it is hot sensitive the bacteria are probably into the nerve or within a milameter. Get to your dentist today or your endodontist next week.
Possibly. Decay or a dying nerve. If the pain lasts for more than 10sec or leaves a lingering ache most likely the nerve is dying or infected by decay so see your dentist or endodontist to determine the best course of treatment.