This is a contactor:
View attachment 3474032
It handles the power to the compressor unit. The low voltage lines from the thermostat switch hook up to it, and is used to turn the compressor on and off.
Check out these two vids:
This dorks video shows the actual switch in action.
Usually when the contactor goes bad, it fails to magnetically pull down the switch.
Please be careful when messing
around with electricity
You should use a multimeter to fully test the contactor, which is best, and should be done either way. Make sure there is power being supplied(240v and 24v). You can quickly test the contactor by using a screw driver and manually pushing down the switch like that dork did in the video. If it now works and everything else is good, replace the contactor. 10-20 dollar part, available at any electrical distributor.