Hello Missy,
Although yeast can be passed during intercourse, a woman can also have a yeast infection without having sex.
Vaginal yeast infections are caused by a fungus called Candida albicans. Yeast are tiny organisms that normally live in small numbers on the skin and inside the vagina. The acidic environment of the vagina helps keep yeast from growing. If the vagina becomes less acidic, too many yeast can grow and cause a vaginal infection.
The acidic balance of the vagina can be changed by your period (menstruation), pregnancy, diabetes, some antibiotics, birth control pills and steroids. Moisture and irritation of the vagina also seem to encourage yeast to grow.
Please let me know if you have any other questions.
http://www.mayoclinic.com/health/vaginitis/DS00255
http://www.intelihealth.com/IH/ihtIH/WSIHW000/9339/10956.html