What acts of magic does Oberon undo and which spell does he leave in place?
There's two Oberon speeches to look at here, both of them to Puck, and both of them outlining what he's going to do. He's the first, from Act 3, Scene 2:
Then crush this herb into Lysander's eye;
Whose liquor hath this virtuous property,
To take from thence all error with his might
And make his eyeballs roll with wonted sight.
When they next wake, all this derision
Shall seem a dream and fruitless vision;
And back to Athens shall the lovers wend,
With league whose date till death shall never end.
So far, Puck has anointed both Lysander and Demetrius with the "love-in-idleness" flower, and both of them are in love with Helena. Titania was also anointed with the flower, and has fallen in love with Bottom.
So. This new herb (I've emboldened the relevant bit of the above speech for you) which undoes the work needs to be applied to Lysander, and to Titania. And that, indeed, is what happens. Oberon also remembers, in Act 4, Scene 1, to take the ass-head from Bottom:
And now I have the boy, I will undo
This hateful imperfection of her eyes.
And, gentle Puck, take this transformed scalp
From off the head of this Athenian swain,
That he awaking when the other do
May all to Athens back again repair,
And think no more of this night's accidents
But as the fierce vexation of a dream.
But first I will release the fairy queen.
So, Lysander, Titania and Bottom are all returned to normal. But Demetrius - who was in love with Hermia to start with - has to be left under the spell.