Warning: This is for PLASTIC headlights/foglights. Do not attempt on glass.
What you need:
Sandpaper - 400, 800, 1000, 1500, and 2000grit (total of $8 at hardware store)
ScratchX or PlastX ($5 at autozone, advance auto, pep boys, etc)
Soft cotton cloth, or microfiber polishing/waxing pad
Total Cost = $13......compared to hundreds of dollars for new headlights and foglights
Step 1: Wet Sanding
2) Get a bowl of water and dissolved a few drops of dish detergent
3) Wet sandpaper and sand with light to moderate pressure in horizontal direction.
4) Rinse, repeat in vertical direction
5) Rinse, repeat in small circles
7) Repeat steps 1-6 with 800grit sandpaper, then 1000, then 1500, and finally with 2000grit
Here a some pics of the process to give you an idea of what things will look like after some of the sanding stages (forgot to take a pic of 1000grit, but you catch my drift)....