This may be a weak question but I'm just confused on what the function actually is. Say we have $f(x) = x^2$. So what is the function? $x^2$? $f$? $f(x)$? $f(x) = x^2$?
I just always thought that $f(x)$ is what we refer to as the function but my textbook for calculus says stuff like "if there exists functions $f$ where ..."
In my opinion the function is $$ f. $$
It is the "name" of this "machine" that acts on numbers, you give a number to it and it gives back a number (you are of course not restricted only to numbers, so let us call this as input from now on and you can give it more than only one input, as it can also give you back more than only one number which we call as output from now on).
But we call the function itself just $f$. Now, only calling it $f$ doesn´t say much about what $f$ is doing. So you can make its name more informative as writing it as
$$ f(x) $$ which means that $f$ would like to recieve $1$ input to act on. You can think of $f(x)$ as the output of $f$. If $f$ can take more than only one input, say $n$, so you may write $$f(x_1,x_2,x_3,\ldots,x_n).$$ Using this way of writing $f$ also allows us to talk about what kind of inputs does $f$ can handle, you may say that $$x\in\mathbb{N}$$ or $$x_1,x_2,\ldots,x_n\in\mathbb{Q}$$
All this still doesn´t say much about what $f$ is doing so you may tell us about it in the following way
$$ f(x)= x^2 $$
which tells us that whatever $f$ gets will be squared. At this point we can make a rather compact and neat way describing what $f$ does, namely
$$ f: A\to B, \ f(x)= \text{some expression involving $x$} $$
which can be read as "$f$ takes one element from the set $A$ and substitutes it into the expression given above and returns an element of the set $B$". This way you can think of $f$ as linking elements between the two sets $A$ and $B$ according to some rules that would make my answer even longer so we skip them.
All in all I think a function is an abstract mathematical concept which we usually name $f$ as it may stand for function.