What is the name of the device that allows switching between two power sources?
A transfer switch allows you to switch between two or more power sources. 

An Interlock is a device that prevents a breaker or switch from being toggled. In the situation of two power sources, an interlock is used to allow only one power source to be on at a time.