If the dirt and grime at the water line is minimal, scrub at it with a used toothbrush and one of these "cleaners":
- Baking soda
- Toothpaste (also works in a pinch as a zit cream or for mosquito bites)
- Dish soap
If it's gotten to a state beyond the mild, natural stuff, don a pair of rubber gloves and use a tile cleaner and a pumice stone. Since you've let it go this far, you might want to try a super cleaner that I can vouch works really well: The Works. According to its website, the brand has been around for more than 50 years. I'm not sure what's in it, and not sure I want to know, but I've cleaned a toilet with some bad rust stains (don't ask) and a pumice file, and that combo did the job. Make sure to use The Works or any other tile cleaner before you use any pool chemicals, and wait a few days after to be on the safe side.