The AND gate is a digital logic gate that implements logical conjunction - it behaves according to the truth table to the right. A HIGH output (1) results only if both the inputs to the AND gate are HIGH (1). If neither or only one input to the AND gate is HIGH, a LOW output results.
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.