When do you test for a pregnancy

When is it a good time to take a pregnancy test? I never know when it’s a good time? Do you test a couple of days before? 1 day before or when you miss your period? Let me know ladies.