When top is run in interactive (non-logging) mode, it is possible to control the output of top, as well as interactively send signals to processes. When operating top, the two most important keys are help (h or ?) and quit (q) key.
top command options
You need to just press q (small letter q) to quit or exit from top session.
Alternatively, you could simply use the traditional interrupt key ^C (press CTRL+C) when you’re done with top command.
To display help just press ?
Related media (Video) – Exit from top command
This tutorial is also available in a quick video format:
(Video 01: How to exit from top command)