Within Emacs you can interact with various shells and other command-line/text-mode programs running as a sub-process within an Emacs terminal emulator:
Emacs itself is fully functional either in a terminal or a windowing system. Some keystrokes available under window systems may not work in a terminal and vice versa.
User can use shell inside Emacs, with shell mode, eshell or term.
in this mode, Emacs run an inferior shell, with I/O through buffer (default to *shell*). The shell buffer is a normal buffer, so you can edit and move around as usual, plus you have special keys to interact with the shell, like to call the previous history command or to go to the beginning of the last output (see all keys in the menu).
in this mode, Emacs emulate a shell. It is writen by Emacs Lisp.
in this mode, Emacs emulate a terminal, then Emacs invoke a shell that you choose, then link to the terminal.