When do you get pregnant

Can you get pregnant when you are fertile or when you are ovulating? Or both? I'm in an argument with my bestie