This is usually visible via ultrasound between 5 - 6 weeks of pregnancy.
If there are still some products of conception in the uterus after a miscarriage this can lead to infection and continual bleeding.