Hello!
As far as I am aware, there is no "Undo" option as Ctrl+Z to just reverse a recent change, but you can always undo/change relations.
If your problem is a parent-child or sibling relationship (which implies wrong parent(s) as well), just click on the person who has the wrong parents displayed. Click on the "More Actions" button on the left side of the screen below the options to add partners, siblings etc. and choose "Set Parents". Set the correct parents - or, if the person doesn't have parents on the tree, select the option "(none)" which will result as no parents to be displayed for the person. Make sure to change both parents.
If your problem is a romantic relationship/partnership, you'll need to click on one of the wrongfully-coupled people, go to "More Actions" as well, then select "Change partners". Now, you'll see a list of all partners your person is connected to. You'll have the option to change each partner's type (to primary, ex and extra, depending on the currently logged type of relationship). Below this is the option to "Remove [first name] as partner" (this is not possible if the couple has children, but since we're talking about an editing mistake, that probably won't be relevant).
Hope this helps!