It is an outpatient operation in which microscopic instruments are used to remove the vitreous gel and manipulate other tissues.
The surgery is done with the patient sedated, lying under a powerful microscope. As you can appreciate from the schematic, operating in that small space requires steady hands. The patient goes home with a patch and drops to help healing. It is usually not painful.