There are several answers to this depending on how it's installed
Device Startup - When the TAS is powered on, it will automatically start up in "ground mode". This is why there are requirements to either A-Have a display capable of taking the unit out of ground mode, or B - Weight on wheels input (or equivilant) to tell the TAS unit the host aircraft is in-air or on the ground. The idea is in case there is a power interruption in flight, there has to be a way to get the unit out of "ground mode".
Weight on Wheels - This is essentially a squat switch (or airspeed switch) that provides a ground to the TAS unit when the aircraft is on the ground. This feature is handy because it prevents the air crew from having to manually transition to "on ground" upon landing. Also, if connected it will prevent the TAS unit from powering on in "ground mode" if the aircraft suffers a power interruption while in flight.
Gear Position - This input is designed for aircraft with retractable landing gear. The TAS units sensitivity level will be adjusted when gear is down in flight, which reduces the tau values used to determine when a TA should be issued. This results in fewer warnings in the high traffic areas close to the landing runway. Fixed gear aircraft with a capable display will do this automatically by using the "approach mode".
Automatic (Encoder Based) - As previously mentioned, the TAS unit will start up in "ground mode". The unit will determined it's field elevation based on the altitude input it recieves at start-up. The TAS will automatically transition from "ground mode" to "flight mode" when the aircraft gains 400ft of altitude (relative to field elevation). Also, as previously mentioned, a fixed gear aircraft with a capable display can be set up for approach mode, by supplying a destination elevation (via the display). As the host aircraft descends to within 1700ft above