With that being said, you now know the basics of what all is going on inside a ballast. The DC power from your car is being turned into AC power to supply the charge needed to power up the HID bulbs. The ballast throws out 23k +/-1-2k of volts to the HID bulbs upon start-up often refered to as warm-up. This is when you seeing HID trun on and start to change colors and get brighter as they warm. This usually lasts only around 25 seconds or so on OEM ballast. Cheaper aftermarket ballast tend to warm-up longer thus causing premature bulb life loss.
Sometimes when people first get HID, they tend to show boat infront of their friends turning their HID off/on rapidly. Is this good some say? The answer is no. If you've ever seen HID turned off and on you would of noticed a 4100k turns redish-orange for a second. This is the bulbs way of saying OUCH! What happens is the bulbs have already created Xenon gas to for the light but hasn't cooled back into salts and then when the bulbs are turned back on, the ballast are sending out a start-up of 23k volts which IS NOT a good thing. The bulbs already had enough Xenon in them to supply light and didn't need the 23k shot to them. This kills bulb lifespan.
So you've learned about ballasts and bulbs now. Lets move on to the wiring now shall we....
Some people out there just aren't aware of the dangers with wiring HID straight off of your existing oem wiring. Should a relay be used to power HID, yes and always needs to be used. Why you ask perhaps? Your oem halogen equiped car was never designed or intended from the manufacturer to use or run high voltage/high current/ high amperage HID ballasts. Ballast draw a imense amount of amps upon start-up and could very seriosuly damage your wiring and not just at where its connected. We are talking serious damage to fuse boxes, ecu's, or worse could short and cause fires on very old cares that even have a hard enough time trying to power halogen. The reason why is, that when the ballast "demand" power, your car has to supply it from somewhere. Lets say its tapped into your oem headlight wire ok. Now you power up the ballasts, the draw current from your wiring, your wiring might not be up to the task so its needs help, t searches for a source and before you know it, you've now weakend not only one source but two now just to try and supply the ballast good clean power. This is why a relay harness is needed. A relay harness gets its power straight from the battery via relays. These relays are then wired to go to your ballasts now.
To understand how a relay works, go here:
http://www.mgcars.org.uk/electrical/body_relays.html<----Excellent link
More about relays!
http://www.bcae1.com/relays.htm
-or this one-
http://electronics.howstuffworks.com/relay1.htm<-------link
What a relay does
A relay is a kind of "remote controlled switch".
From the inception of the electric starter, some kind of remote switch was required in order to provide the power to the starter motor without bringing the heavy, unwieldy wires to the dash and, as a result, making them longer with consequent voltage drop. Having a remote switch allows application and interruption of current to be done at the most electrically efficient point in the circuit, even if it is the most ergonomically least suitable position. At first, starter motors were operated by pulling on a cable which operated the switch, much in the same way that a bonnet (hood) latch is still actuated today.
The solenoids used for inertial engaged starter motors were effectively relays. A switch, sometimes operated by a key, could pass a small current to the solenoid which would move an actuator that would in turn engage a bigger switch capable of carrying the very large current the starter required. Later, pre engaged starter motors required that the solenoid had to do more work, throwing the pinion into the ring gear before making the electrical connection to the motor itself, and so its electric current requirements went beyond the capability of the ignition/starter switch. To overcome this limitation, a relay was used to remotely switch the solenoid. Indeed, the first relay fitted to MGB's was for this very purpose.
Basically, inside a relay there is a small electromagnet that requires, in most automotive relays, about 0.25 Amps to operate it. Once this small current is flowing, the electromagnet can pull-in (or if so configured, let-go) a switch capable, depending on the relay, of controlling many times that current, but usually from 30 Amps to 70 Amps. Not only does the relay deliver more power to the load than could be efficiently achieved with a dash or column switch and its associated wiring but the dash switch and wires can be smaller, lower cost and have longer life owing to the minimal heating and arcing that results from switching, carrying and interrupting only 1/4 Amp.