Nail stain easier especially if it's a dark color or a red polish. Using a good base coat will help prevent this most of the time but if you forget it or use only dark colors or always have polished nails, like me, then staining can become a problem. What can you do? You could just repaint them and hide the stains or wait for the nails to grow out or you could try some of these methods.
Remove all nail polish and leave your nails unpolished periodically. Having the nail cover with polish prevents oxygen from reaching the nail plate and is needed to maintain a healthy nail color.
Remove all nail polish from nails and wash hands with soap and water while using a nail brush to scrub the nail surface and underneath the nail. This step is just a good place to start; you might not notice any changes in the stains yet.
Scrub nails with toothpaste using a nail brush or even an old toothbrush. A whitening toothpaste may even work better. The toothpaste will remove surface stains and give your nail a nice shine, too.
Grab a lemon and squeeze a few drops onto each nail and rub for about 30 seconds and rinse. Or soak your nails in lemon water for about 10 minutes. Your nails will already be noticeably whiter because lemon juice acts as a natural astringent and aids in removing stains but you might have to repeat this a few times to completely remove the stains. Lemon juice can also dry out your skin and nails so be sure to apply cuticle oil or a moisturizing hand lotion afterward.
Also be aware that if the lemon juice doesn't work at all, you might have a bigger problem on your hands than just stained nails. Yellow nails can be a sign of diabetes.
Combine a tablespoon of baking soda and a tablespoon of lemon juice and mix well until it forms a paste. Apply some paste on each nail and leave in place for about 5 minutes then rinse. You could even scrub with a brush if you want while you wait. A lime can also be used in place of a lemon.
Drop a denture cleaning tablet into a bowl of warm water and let it dissolve. Soak for several minutes.
Use a buffer and gently buff the nail surface. Wash hands with soap and water and then apply a moisturizing hand lotion. Just be careful not to buff too much. Small amounts of buffing can remove stains, smooth ridges, and promote nail growth but too much will weaken nails and lead to breaking. (I speak with experience here.)
There are also great products available at Sally Beauty Supply or drugstores that can help whiten your nails but I would recommend trying these homemade-do-it-yourself methods before you go out and spend money.
FINAL NOTE: Whitening your nails is a great way to clean them and brighten them. I recommend whitening your nails once a week if they are really stained. In order to maintain your new cleaner, whiter, happier nails, you need to continue whitening them at least once a week. You can't do it once and expect it to last forever, especially if you continue to paint them all the time or with dark colors or if you don't use a base coat.
Hope these ideas helped!