excerpt from the book The Linux Command Line. The full PDF tutorial is also available here. The below excerpt is verbatim from this book, p. 42.
A command can be one of four different things:
An executable program like all those files we saw in /usr/bin. Within this category, programs can be compiled binaries such as
programs written in C and C++, or programs written in scripting
languages such as the shell, perl, python, ruby, etc.
A command built into the shell itself. bash supports a number of commands internally called shell builtins. The cd command, for
example, is a shell builtin.
A shell function. These are miniature shell scripts incorporated into the environ- ment. We will cover configuring the
environment and writing shell functions in later chapters, but for
now, just be aware that they exist.
An alias. Commands that we can define ourselves, built from other commands.
It is often useful to know exactly which of the four kinds of commands is being used and Linux provides a couple of ways to find
type – Display A Command's Type
The type command is a shell builtin that displays the kind of command the shell willexecute, given a particular command name. It
works like this:
type <command> Ex:
ls is aliased to `ls --color=tty'
cd is a shell builtin
which – Display An Executable's Location
Hope this is helpful for new users to know basic about commands.