When to take a pregnancy test


Ok everyone so I’m confused about when to take a pregnancy test. I know websites and pregnancy test packages say different things like one week after your missed period, etc. what does it mean when they say you can test 6 days before your missed period? How would you do that if you don’t know if you’re going to miss your period? Sorry, I’m just really confused on that!