I would like to know whether the commands that we call in the shell are functions or programs?
Yes.
Specifically, when you type in some text and press enter, the shell must determine whether it's:
- an
alias, - a function,
- a built-in command,
- an executable file (and then whether or not it's a binary program or a script).