In essence very simple. You dive to gain as much speed as possible. Pull up sharply into a very nose-high attitude and then let the aircraft describe a ballistic arc (zero g) until you are back to a very nose-low attitude again. At the top of the arc your airspeed will be almost zero if you timed it well (and that's no problem since you can't stall with zero g), and at the 2nd half of the arc your airspeed builds up again. At the end of the ballistic arc you pull up sharply again and repeat the whole process.
Obviously the characteristics of the flight depend on the exact airplane involved, but a flight would, I guess, typically be 30 seconds of zero g followed by 30 seconds of two g. Very sickening. I think NASA calls the airplane with which they do this the vomit comet.
What I remember from reading about that surgery is that the actual cutting was done during the periods of zero g, then they had to down their tools for the two g period, and so on. Ad nauseum (literally, probably).
A neat trick I heard from an aerobatics pilot was the following. To maintain zero g, he would just put his pencil in the air and chase that as if it were his artificial horizon.