To undo something is to reverse an action or return to an original situation. The prefix "un" makes the root word "do" negative, but it is also suggests a reversal.
simple
past
past participle
undo
undid
undone
We’re trying to undo a problem that we created.
The boy undid his seatbelt and got out of the car. (This sentence is in thepast tense.)
My shoelaces came undone. (There were tied and then they became untied.)
If you make a mistake while editing a document, pushing command + z will undo it.
Go to Edit and click on Undo. (In this sentence, "undo" is a noun.)
Years of economic progress in the country were undone by a dictator who quickly rose to power. (This sentence is in the past tense, passive voice.)
In some situations, it’s impossible to undo what has already been done.
Getting involved with organized crime was the beginning of the young man’s undoing. (In this sentence, "undoing" is a gerund. It means his personal situation became very bad.)
Undoing years and years of polluting and neglecting our environment will take several decades.