Pregnancy bleeding??

Ive been reading stories about bleeding a period like during their pregnancy. I wonder if it happened on your due date or did it happen randomly?