Is it a miscarriage?

I’ve been bleeding for almost a month now. It bleeds for a period of time stops and starts back up. It’s been like this since the 21st or around that time of August. Two days before I took a test that said I was pregnant. I don’t know if this will ever end. Every time it does it starts back up again.