CMOS inverter
A CMOS inverter connects a pMOS on the supply side and an nMOS on the GND side in series, with the same input applied to both gates. When the input is 0, the pMOS is on and the nMOS is off, so the output is the supply voltage (1); when the input is 1, the pMOS is off and the nMOS is on, so the output is 0.
In either state one of the transistors is off, so almost no current flows from the supply to GND. This is why CMOS consumes so little power. While the input is switching, however, there is a moment when both transistors conduct at once, and a short-circuit current flows.
Try it: input voltage and output
Sweep the input voltage from 0 to the supply voltage and watch the on/off states of the pMOS and nMOS and the output voltage change. The graph on the right shows the input-output relationship (the voltage transfer characteristic). The conditions are VDD = 1.2 V, a threshold voltage magnitude of 0.35 V and equal nMOS and pMOS drive strength, calculated with the long-channel square law.