Ovulation

What is ovulation? I'm so confused, is it something only pregnant women go through or is it for periods? Overall what is ovulation and does it hurt??