To reverse or cancel the effect of something. She wished she could undo her last move in the game.
To unfasten or untie something. He began to undo the buttons of his coat.
To bring about the downfall, ruin, or destruction of. A single strategic error undid the company within months.