Save and quit by typing:
:wq
followed by Return. Alternatively, type ZZ.
Note that the command ZZ is neither preceded by a colon nor followed by Return.