Without going into a science lesson, ballasts come in two flavors: magnetic and electronic.
Both types are used with
HID's (Metal Halide, Mercury Vapor, High Pressure Sodium, etc...) and fluorescent bulbs. Although
VHO,
HO, and T5 bulbs can only be used with electronic ballasts and NOT magnetics.
To tell you the truth, I am not really positive how an electronic ballast works. I know a magnetic ballast act basically like an inductor in that wire is wrapped around a copper core. This allows the ballast to regulate (add resistance) the flow of current through the bulb. It does this because the gas inside the bulb actually has less resistance than an ordinary wire conductor. Without the ballast, the current flowing in the bulb, that allows it to produce light, would continue to increase and the bulb would probably explode or burn out. I imagine an electronic ballast does the exact same thing but uses circuitry instead of the inductor style.
Depending on the ballast, the starter may be internal or not. All electronics have internal starters. Most fluorescent magnetics do as well. I would doubt you would ever use a magnetic ballast for aquaria use that does not have an internal starter.
HID magnetics use a capacitor to store electrical current and "startup" the bulb. The capacitor is normally mounted right next to the ballast.
As Logan pointed out, the electronic ballasts tend to start faster (although for
HID bulbs, it doesn't matter much since the bulb still has to "warm up" which takes a few minutes), run cooler, and use a tad less power. One other nice thing about the electronics is that you can run all types of configurations of bulb and wattage with the same ballast.
For example, I have a Fulham Workhorse 5 electronic ballast I use to run my 2X55w
PC's in my canopy. The Workhorse 5 can run just about any number of
VHO,
HO, T5, and
NO bulbs I throw at it as long as I keep the maximum working wattage of the bulbs under 120w. I would not have this luxury with a magnetic ballast as I would have to buy a specific ballast to run a specific bulb. If I wanted to change the bulb to another type down the road, I would also have to change the magnetic ballast out.
I am a fan of electronic ballast for all fluorescent bulbs. This is because they are lightweight, relatively small, and run cool. They are perfect for mounting in a canopy.
For
HID bulbs, I actually prefer the magnetics. This is because I like to remote mount these ballasts so I really don't need a cool running ballast since it isn't anywhere near the canopy. The other reason I like the
HID magnetics is simply for the cost. Magnetic ballasts are typically less than half the price of electronics and you can find them in just about any electrical supply warehouse. Some people will claim that magnetic ballast will not run as long as electronics, and while I think they are probably right, I could buy at least 3 (probably 4 from my supply house) 250w Howard magnetic ballasts for the price of one Icecap 250w electronic ballast from any aquarium store. I would bet money that the Icecap won't live longer than all 3.