As the air is brought to rest there is an associated temperature rise is the simlple explanation. This rise is linked to airspeed (Mach No). SAT is usually the more useful of the two... well, for the work I do anyway.
The quations used to get from TAT to SAT are quite lengthy, but they can be found in good aero/met books for engineers.