The text interface for typing commands to the shell, as opposed to a graphical desktop.
"Terminal" and "shell" get used interchangeably but are two different programs stacked on top of each other. The terminal (or terminal emulator — Gnome Terminal, iTerm2, Windows Terminal) is the window that displays text and captures your keystrokes. The shell is the program running inside that window, interpreting what you type.
CLI (Command-Line Interface) is the broader concept: any interaction with software through typed text commands rather than clicking. A shell is the most common CLI on Linux, but plenty of individual programs (psql, mysql, python's REPL) have their own CLI too.
The terms tty and pty are historical leftovers from real hardware: a tty (teletypewriter) was a physical terminal device wired to a mainframe. Modern terminal emulators create a pty (pseudo-terminal) — a software-emulated version of that same device interface — so old Unix conventions around line editing and signals still work unchanged.
Terminal multiplexers (tmux, screen) sit between the terminal and shell to let one terminal window host multiple independent shell sessions, and — importantly — keep those sessions running even if the terminal window itself is closed or the SSH connection drops.
nohup, screen, or tmux, a closed terminal sends SIGHUP to everything running in it.