What causes polycystic ovaries and what medication can I take...

Inherited. Polycystic ovarian syndrome is a genetic predisposition. If a correct diagnosis has been made it is for lifetime. On the brighter side many symptoms and quality-of-life issues related to pcos can (often) be improved with home interventions such as weight-loss, and with medication. The drug metformin can help for some women with PCOS, but needs a doctor's eval and prescription. Good wishes.