This is the final quest in the College of Winterhold storyline.
After you have retrieved the Staff of Magnus from Labyrinthian, you will not be able to fast travel back to the College directly as Ancano's shield is much larger than before. Instead, fast travel to the town of Winterhold. You are directed to speak to Tolfdir when you arrive, but doing so is not necessary to continue.
Use the Staff of Magnus on the shield surrounding the college and proceed to the courtyard. From there, go straight and enter The Hall of the Elements.
Run up to Ancano to initiate dialogue and he will make the Eye of Magnus' overlapping pieces start expanding and separating. It will also emanate a bright light.
You do not need to attack Ancano at all during this "battle". Instead, point the staff at the center of the glowing, separated Eye of Magnus. Slowly, as you hit it, the Eye will reform. Once it has reformed, Ancano will trudge back and separate the eye once more. You'll need to do this just a few times before Ancano is finally out of health.
Each time Ancano separates the orb a new Magical Anomaly will spawn. You'll need to kill these as well before the members of the Psijic Order show up to say goodbye.
And yes, you get to keep the staff. You are also awarded the title of Arch-Mage, Arch-Mage Robes and the Key to the Arch-Mage Quarters. Quite a nice collection of alchemy ingredients in there, with an alchemy set and an enchanting table to boot.