A computer works in terms of “on” or “off”, “true” or “false”, “0” or “1”. It works like this because their are only two setting to the transistors(a digital switch that senses spikes of electricity) . If there is a spike of electricity it is treated as true, 1 or on, if there isn’t then it is treated as off,false or zero. The transistors are on the Central processing unit(CPU) of a computer.
The gates come in when the transistors on a chip combine in such a way that they make boolean operations( operations where the answer is true or false). THeire are three types of gates.
And: It takes two input signals to make one output signal. The out put signal will only be true if both input one and input two are true so only if there are two spikes of electricity otherwise the output will be false. THis is often represented by a uppercase d kind of shape.
Or:A Or gate takes two input signals to make one output also. However in order for the output to be true it only requires that one input be true,so if one or both inputs or true the output is also true otherwise the output is false. This gate is represented by a sideways u or v with a curved line going inward at the opening.
Not: A not gate takes only one input and makes one output. With this gate the opposite of the input is the output. For example true would turn into false and false would turn into true. This gate is represented by a Triangle with a circle on the tip.

In case my description of what the gates are depicted as don’t help you. I found the image with a google search, but its from Norwegian Creations.