Pregnant and still having periods

I’ve heard mixed thing about this but was wondering if you could still have a period and be pregnant. My aunt had one while she was for the first few months as did a friend of mines aunt. Was just wondering why/how does that happen exactly?