To switch from one setting to another. The term toggle implies that there are only two possible settings and that you are switching from the current setting to the other setting.
A toggle switch is a switch that has just two positions. For example, light switches that turn a light on or off are toggle switches. On computer keyboards, the Caps Lock key is a toggle switch because pressing it can have two meanings depending on what the current setting is. If Caps Lock is already on, then pressing the Caps Lock key turns it off. If Caps Lock is off, pressing the Caps Lock key turns it on.
Toggle switches also exist in software. For, example a check box in a dialog box is a toggle switch.