MOSFETs:
In MOSFET, the switch may be realized by applying a voltage across gate and source terminals. While the voltage among the gate and source is zero, the switch is open; no current is permitted between the source and drain. If a voltage is applied among gate and source the switch is closed a current pass between the source and drain, transistor is on, it behaves like a closed switch. Note down that the current direction for n-channel and p-channel MOSFETs are in opposite directions as shown in Figure and therefore the voltage across the gate and source should be applied accordingly. A switch built up of three terminals of a MOSFET is also depicted in Figure
Figure: MOSFET Switch