Vitrectomy is typically performed in more complex cases of retinal detachment. During the procedure, the vitreous gel is removed, and the retina is reattached with the help of gas or silicone oil.