Before reading this page read the one on LOGIC GATES.
The AND gate has two or more inputs and one output.
The output voltage goes high only when all input voltages are high.
In the switch diagram the lamp lights up only when A and B are operated. If only one is switched then the lamp stays off.
In the truth table Z = 1 only when A and B = 1.
The Boolean expression is A. B = Z which translated says, A and B both high,
makes Z high.