Use the word toggle for a switch that has two positions, on and off. As a verb, it means "switch or alternate," the way you toggle between screens as you video chat with two friends at once.
The 18th century definition of toggle was "pin passed through the eye of a rope to hold it in place." It's still used for a similar kind of fastener, as well as for an up-and-down switch such as a light switch. In computer technology, a toggle is an on-off command, like the key that turns your caps lock on or off. You can also use this word figuratively: you might find it difficult to toggle between French homework and Spanish homework without mixing up your verbs.