Undo Command
The U (Undo) command corrects any changes or commands issued in error.
The U command reverses or wipes out the last command that changed the item. Because cursor movement commands do not change an item, the U command ignores them.
To illustrate, you could press J (Insert Character), insert a string of text, and press ESC to return to Edit Mode. This could be followed by several cursor movements. Then you realise you did not want to insert the new material after all. The U command reverses the Insert Character command, which includes the typing of text and pressing ESC to return to Edit Mode.