A tty
is a physical terminal-teletype port on a computer (usually a serial port).
The word teletype is a shorting of the telegraph typewriter, or teletypewriter device from the 1930s - itself an electromagnetic device which replaced the telegraph encoding machines of the 1830s and 1840s.
A pty
is a pseudo-teletype port provided by a computer Operating System Kernel to connect software programs emulating terminals, such as ssh, xterm, or screen.
A terminal is simply a computer's user interface that uses text for input and output.
These use pseudo-teletype ports however, their naming and implementations have diverged a little.
Linux mounts a special file system devpts on /dev (the 's' presumably standing for serial) that creates a corresponding entry in /dev/pts
for every new terminal window you open, e.g. /dev/pts/0
macOS/FreeBSD also use the /dev file structure however, they use a numbered TTY
naming convention ttys
for every new terminal window you open e.g. /dev/ttys002
Microsoft Windows still has the concept of an LPT
port for Line Printer Terminals within it's Command Shell for output to a printer.