Is it true we only ovulation for roughly 12-24 hours?

Sammy
A friend told me that we only ovulate for 24 hours and a mans sperm is only live for a couple of hours too I find this hard to believe as so many people get pregnant? I'm trying to conceive 2 years and counting?