Basicly they are used to up the current from the 120VAC thats in your walls to the proper levels for the light to operate. Different types of florecent require different ballasts because they operate at different Hz levels for example. In addition MH
bulbs require the ballast be matched to the bulb's wattage. For example a 175W MH
bulb needs a 175W MH
ballast to fire it. This is a very basic definition but I think you will get the idea.