Question?

Hi everyone I’m on the pill but with all this going on I haven’t really been taking it properly as I’ve ran out. I have stopped it a week or two now and today got really bad pains and some blood but after a while they went away as well as the bleeding. Is this just a period trying to begin or does anyone know what it could be?