As mel_g20 said above, for IVF the eggs are collected from the ovaries via a needle that is passed through the vagina and into the follicle on the ovary containing the egg. Egg retrieval for IVF is done under light sedation, so you should not feel a thing or even remember much of the procedure.
The GP might have meant that a fertility specialist may recommend key hole surgery (a laparoscope) to investigate why you are having trouble getting pregnant, eg, endometriosis, ovarian cysts, scar tissue, damage to fallopian tubes, as this can then help in whether to decide to go ahead with IVF or try the less invasive IUI first. The male's sperm should also be tested for any problems.
Good luck