The ballast is the unit that provides the starting voltage and current for the HID lamps. They're actually arc lamps not filament lamps so need several thousands of volts to make them work. There is a very good tutorial about them on this site. I've put the link in here:
http://www.intellexual.net/hid.html
and more info (also from this site) here:
http://www.bmwmotorsports.org/pdf/xenonretroinstall.pdf