Shell mode

You can start a shell in Emacs by invoking the command shell. Some other buffers (e.g., *tex-shell*) have a similar behavior.

Here are a few more often used commands:

C-c C-c

C-c C-z

M-p, M-n (at the command prompt)

TAB (while typing a command)