You cannot get your period while you're pregnant. Bleeding occurs during pregnancy for various reasons, some serious and some not. You could experience bleeding if there's more blood going to your cervix during pregnancy. If you are unsure take a home pregnancy test or consult a doctor.
If you had confirmed positively that you were pregnant, then at some point afterwards started bleeding then it could be a miscarriage. Though some spotting/bleeding can be normal, so the best thing to do would be to call your ob-gyn immediately. They will need to check you out to see if you indeed did miscarry, and if you did, make sure that you have passed any remaining fetal tissue (which can lead to scarring and later pregnancy complications if it's not removed).