How does a MOSFET work?

Explain the circuit at the end of the video