When you type commands in an xterm, you are actually interacting with a piece of software called a shell. The shell interprets your command line and causes your program (or programs) to be executed in an appropriate way. The shell is also a fully-featured programming language in its own right.
There are a number of common Unix shells:
For further information refer to the various man pages for each shell.