Use ghjk to move the cursor.
To quit, type :q and press Return.
If you don’t want to save your changes, you can use :q! instead.