Can some one please shed some light...

Ok, so I'm almost certain & the lady at the hospital is almost certain I am going through a miscarriage. I have come to terms with this. 
My problem is, I have been bleeding on/off with cramping on/off since Monday. I was wondering if some one could tell me how a miscarriage happens? Even gory details if some don't mind. 
I just feel so lost as to what's going to happen.
Thanks in advance.x