WL is a term rewriting system based on patterns and replacements. Evaluation substitutes patterns with their replacement. (This is a simplified view of evaluation, it is a lot more complex).
(* In this example the pattern is literal f[x] so that is the only pattern that will match it *)
ClearAll[f, x, y]
f[x] := (x + 1)^2
f[x]
(* (1 + x)^2 *)
f[y]
(* f[y] *)
(* The Blank is not bound to a symbol so the replacement cannot refer to the bound value *)
ClearAll[f, x]
f[_] := (_ + 1)^2
f[x]
(* (1 + _)^2 *)
(* Blank is bound to x so x can be used in the replacement *)
ClearAll[f, x, y]
f[x_] := (x + 1)^2
f[y]
(* (1 + y)^2 *)
Take a look at this video for an explanation of function definition and evaluation.