Periods and pregnancy

How do periods stop when you're pregnant? When you get a period does that mean you're not pregnant? How can you tell?