Meaning : Cancel, annul, or reverse an action or its effect.
Example :
I wish I could undo my actions.
Meaning : Cause the ruin or downfall of.
Example :
A single mistake undid the President and he had to resign.