Ovarian cyst

I've been having terrible pains especially while on my period. So I went to the doctors and they told me I have an ovarian cyst that they need to do surgery on. They didn't tell me how big it was or if it had caused any damage to my ovary just that they needed to do surgery on it. My question is my periods are starting to become more and more irregular the last couple months and when I do get them I'm in an excruciating amount of pain, so could the cyst be causing all of this and if it is, how bad must the cyst be to be causing all this pain? Has anyone had something similar happen to them? Did the cyst effect your fertility? Did the pain go away after surgery?