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*).
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.