Miscarriage

So yesterday morning I believe I had a miscarriage but I went to the hospital and they told me that it wasn’t but in my cervix they seen a small ball of mucus. Is that a miscarriage or am I pregnant I’m really confused because nothing should be in my cervix... btw I don’t have an uti or std!