Pill Timing

So what's a good timing that everyone take their pill? Also how does taking the pill works? Because the last time I used the pill I ended up pregnant and I'm definitely not trying to go on that route again anytime soon.