You are inside vim. To save changes and quit, type:
<esc> :wq <enter>
That means:
- Press Escape. This should make sure you are in command mode
- type in
:wq - Press Return
An alternative that stdcall in the comments mentions is:
- Press Escape
- Press shift+Z shift+Z (capital
Ztwice).