Switches, also called Toggles, presents options to the user. These are commonly an on and an off option. Use when the change carries through immediately, like a light switch. The chosen option has to distinct. This pattern works best on mobile or tablet as a swiping motion is used to turn it on or off.
The switch consists of a thumb (the thing that moves) and a track (the thing that the thumb moves along). This of often shown with a round object for the thumb, and an elongated object or line for the track.
The difference to a slider is that switches have two settings, typically, on/off, whereas sliders are a sliding scale.