Miscarriage at 7weeks

So I went to Er and found out I’m having a miscarriage...Ik this is nasty but can some one explain what this is? I also had two clots the size of lemons one before and one after this...