The orange wave is A, green is B and blue is Y.
The C in CMOS stands for 'complimentary', because pairs of NMOS and PMOS are used to fabricate a CMOS circuit. This circuit is a NAND gate, which is a universal gate and can easily be fabricated using CMOS technology.
The truth table for a NAND gate is:
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
A NAND gate's output is high as long as both of it's inputs are not 1, which is the opposite of an AND gate.