If you are breastfeeding your baby AND you need to be treated. You would use a yeast infection treatment cream on your nipples--need to wash it off befor nursing. You also need to sterilize everything that goes into your baby's mouth daily, and if you use a breast pump, that should be sterilized daily. After the infection is cleared, you should throw away pacifiers and bottle nipples to get new ones.
If you aren't breastfeeding...still follow the sterilization rules...but I've always heard that using genation violet in the baby's mouth is the best treatment. Messy since it is a dye, but effective.
Good luck!