Complementary metal oxide semiconductor(CMOS) is made of p-mos and n -mos. It is basically an inverter. When the input is 0, p-mos acts as close switch and n-mos acts as a open switch. Therefore the Vcc is present at the output. When input is 1 pmos acts as an open switch and therefore the output is zero.