Yeast infection

How do I get rid of a yeast infection and how long does it usually last?