I was getting them alot for a while but they seemed to have cleared up(knock on wood) What did I do to get rid of them? Iam not really too sure. One thing that has helped was buying properly fitting shoes and cutting my toenails straight across (like girl_geek said)
The foot doctor told me that usually, once you get them you are prone to getting them indefinitely. The only thing they can do to rid you of it is to freeze your toe and take out the whole nail. This was an option that was not willing to do because the needle they use to freeze you is the most painful thing in the world when it has to be injected into your fingers or toes. Believe it or not, your fingers and toes have more nerve endings than practically anywhere else on your body. Anyway, I've also heard that in some cases when they remove your nail, it never grows back. I didn't believe the nurse when she said that but who am I to argue!...LOL
Try soaking your feet in epsom salts and cleaning the erea very gently and cutting the toe nail straight across and make sure you get all the way across and don't leave any nail pieces digging into the corners, or the skin will keep growing over top of that. That is how it gets infected.
Good luck!