This the CMOS inverter logic circuit. When input is given as 0, the pMOS forms Channel and turns ON which results the 5V on the voltmeter. Again when the input is given 1, then the pMOS turns OFF and cMOS turns ON. Since no voltage is passing through pMOS the output voltage is 0.