If you consider an AND gate.
If both inputs are "1" then the output is a "1". Simple rule, but very powerful.
But what if you had one input high all the time?
Can you see that what comes out of the output would depend on what is coming into the other input. If it was a stream of pulses, they would come out of the output. If they were high, both inputs would be high so the output would be high. If they were low, one input is high but one is low so the output is low.
Now make that first input a Zero.
Now, it doesn't matter what comes into the other input. Nothing will get sent to the output.
At least one input is low so the output is low.
So, you can control the outputting of that stream of pulses just by putting a 1 or a 0 on the other input. Put a 1 there and they get through. Put a 0 there and they don't.