When is a good time to take a pregnancy test?

I've heard so many things about when is a good time to take a test but not sure if I'm doing it too early or wrong. (I got the whole peeing on a stick part down) but when should I take it?