Physics of the Upper Atmosphere