When do I avoid sex?

I'm on the pill but I want to be extra careful by avoiding sex when it's a high risk. Does that mean I have to avoid sex when I'm ovulating? I'm confused about the terms: fertility, ovulation, cycle days. I'm so confused!!! Please help. How do I know how many days to avoid sex?