The relay is just a little switch. It has (usually) 4 tabs (elec. connectors) on it.
1> Battery positive (directly from battery source)
2> Positive output to the accessory (headlights in this case)
3> Switch positive
4> ground (earth)
In relaxed mode the relay is open (no current going to the access.)
When you provide current from the switch (headlight switch in this case), it closes the contacts on the relay allowing juice to the lights (full battery juice).
The advantage to the relay use is that the power going through the switch is minimal. It only takes a very low amperage to close the relay. Thus, the lights (or other accessories) get full juice without burning out the switch. Stock early Z headlights don't draw that much amperage so it's not THAT big of a deal. Although, by putting in a relay, even with the stock lights, the lights will shine brighter, because you can give 'em more juice and not worry about the switch burning up.
Here is a good article if you need more detail:
http://electronics.howstuffworks.com/framed.htm?parent=relay.htm&url=http://www.teamrocs.com/technical/pages/relay_basics.htm
Hope this helps.
Tim