The instructions will be listed on the home pregnancy test.
You want to wait until your period is due or when it is late. Then use your first morning urine to take the test - as that will have the highest concentration of hcg (the pregnancy hormone) in it.
If you are not wishing to get pregnant, use birth control. Even if you are on your period, there is a slim chance you could get pregnant. It isn't likely, but it is possible.
Don't be confused about it. You are smart enough to know that unprotected sex equals pregnancy. Be smart enough to know that protected sex is more enjoyable.