Warning: do not mix up terms, variables, constants, functions and predicates.
In First-Order Logic, terms function as names, and well-formed formulas (atomic or not) as statements. There is a neat inductive definition of a term:
- A single occurrence of a variable is a term;
- A single occurrence of a constant symbol is a term;
- If $f$ is an $n$-ary function (meaning that it takes $n$ arguments), and $t_1$, $t_2$, ..., $t_n$ are terms, then $ft_1t_2\ldots t_n$ is a term.
Now, the direct definition of an atomic formula:
- If $P$ is an $n$-ary predicate symbol and $t_1$, $t_2$, ..., $t_n$ are terms, then $Pt_1t_2\ldots t_n$ is an atomic formula.
These two definitions look a bit similar (just a bit, though), so let me make it very clear:
- A TERM is an ELEMENT OF THE LANGUAGE (by its inductive definition, it can be as simple as a single occurrence of a constant or a variable, or arbitrarily complicated if it is formed with a function).
- An ATOMIC FORMULA is a LOGICAL STATEMENT, i.e. one to which you can assign a TRUTH-VALUE. From atomic formulae, you can build up, using logical connectives, any other formula.
- A FUNCTION takes $n$ terms and is evaluated as a NEW TERM.
- A PREDICATE takes $n$ terms and is evaluated as a TRUTH VALUE.