Why are people being prescribed metformin?

I've seen a few posts now about people TTC and saying they've been prescribed Metformin? My mother has that to treat her diabetes why's it prescribed when TTC? X