How Home HVAC controller send commands for Cooling, Heating?
Home thermostats interface with the rest of the HVAC system with a few wires. Usually they switch low voltage (eg. 24VAC) with several contacts or solid-state switches, to control heat, cool and fan operation. 

If you have an electronic one, the buttons or whatever go to a micro in the thermostat, not outside of the thermostat. 

The wire color codes and names are fairly standardized, look at Honeywell, Nest etc. wiring diagrams. 

Note that the other side of the 24VAC is typically not present in the thermostat housing.