The switching is automatic.
One thing to be aware of is that if you have appliances running, when the transfer switch changes from shore power to generator and back, there can be arcing at the contactors inside the transfer switch. Repeated arcing can cause pitting on the contacts. If you do this enough, eventually (a few years down the road) it may lead to a transfer switch failure. The same thing can happen when you connect or disconnect shore power. The higher the electrical load, the more likely to have an arc, and perhaps a bigger arc.
Although it's not essential, as a good practice, some of us have changed our connect/disconnect/generator start and stop procedure to prevent arcing inside the transfer switch. The simple way to do this is to open the circuit breaker panel and turn off the 50 amp breakers before disconnecting shore power, and leave them off until reconnected. Before firing the generator, turn off the breakers. When starting the generator, after the transfer switch fires, turn the breakers back on. Then turn the breakers off before shutting the generator down.