The transfer switch by default should connect to shore power. When it see's generator power, after about a 30 second delay, the transfer switch will switch to generator power. Once the generator power is shut off, the switch will switch back to shore power. Also, if you are plugged into shore power, the transfer switch will still switch to generator power after it "sees" generator power.
If the generator power should drop below (about) 105 volts, the transfer switch will instantly drop generator power and switch back to shore power (if connected) or an open state if not connected to shore power, until the generator power goes above (about) 105 volts. This will happen if you try to restart an air conditioning unit on a hot day shortly after it has been shut off (the air conditioner has very high head pressure and requires a ton of amps to restart resulting in a big voltage drop)
Hope this helps,
John