An electronic ballast uses solid state electronic circuitry to provide the proper starting and operating electrical conditions to power discharge lamps (fluorescent lamps, CFLs, etc).
They first convert the AC line voltage to DC and then convert the DC to high frequency pulses.
There are many ways these can be made. You can find many many circuits with transistors. There are dedicated controllers as well for ballast circuits. One common one is the IR2153.
Hope this helps.
Tahmid.