I think if you look closer, you'll see that in each type of gate,
two lines are the inputs and the third one is the output.
The signal that appears on the output line is decided by
the signals that you apply to the two input lines. The 'rule'
that's used to make the decision is different for the two
types of gates ... they apply different 'logic'.