Lets start with this, a dual filament headlight plug.
This lamp is wired just like a 1157 bulb, only it is bigger.
The ground terminal is connected to the negative battery terminal, just like the brass base on a 1157 bulb.
When the low beam headlights are on, the electricity goes from the low beam terminal, through the low beam filament, to ground. The electricity cannot go back out the high beam terminal, because it is not connected to anything. In the same manner, when the tail lights are on, the electricity goes from the tail light contact on the base of the lamp, to the tail light filament, to the base, and ground.
When you turn on a turn signal, the turn signal switch also applies power to the turn signal contact on the 1157 lamp, goes through the "bright" filament, and then to the brass base of the bulb, and then ground.
Think of it this way. You could have completely separate lights for turn, and tail lights, on each side of the car. You could a wire for the tail light switch, to the tail light, and a ground wire all the way back to the battery. Then you could do the same thing for the turn signal switch, the turn signal lamp, and a separate ground wire back to the battery.
You now have two ground wires at the battery. One wire will do. Why not just connect the turn signal ground wire, and the tail light ground to one wire, with a "Y" connection, and run only one ground wire to the battery?
The 1157 lamp does exactly that, but the ground wire "Y" is inside the lamp, so you only need one ground wire for the two lamps, in one bulb.