Example 1 Try to find all mappings $f: \mathbf{R} \rightarrow \mathbf{R}$, such that for all $x$, $y \in \mathbf{R}$, we have
$$
f\left(x^{2}+f(y)\right)=y+(f(x))^{2} .
$$
Solving $f(x)=x$ naturally satisfies (1). The question is whether there are other mappings that meet the requirements.

Suppose $f$ meets the requirements, then by (1) and the fact that $y$ can take any real number, $f$ is surjective.
If $f\left(y_{1}\right)=f\left(y_{2}\right)$, then by (1),
$$
\begin{array}{c}
y_{1}+f^{2}(x)=f\left(x^{2}+f\left(y_{1}\right)\right) \\
=f\left(x^{2}+f\left(y_{2}\right)\right)=y_{2}+f^{2}(x),
\end{array}
$$

thus $y_{1}=y_{2}$. Therefore, $f$ is injective.
In (1), replace $x$ with $-x$, we get
$$
y+f^{2}(-x)=f\left(x^{2}+f(y)\right)=y+f^{2}(x),
$$

thus
$$
\begin{array}{c}
f^{2}(-x)=f^{2}(x), \\
f(-x)=f(x) \text { or } f(-x)=-f(x) .
\end{array}
$$

Since $f$ is injective, when $x \neq 0$, $f(-x) \neq f(x)$. Therefore, when $x \neq 0$, $f(-x)=-f(x)$, and both $f(-x)$ and $f(x)$ are non-zero.
Since $f$ is surjective, there must be $f(0)=0$.
In (1), let $x=0$, we get
$$
f(f(y))=y .
$$

Therefore, for any real number $y$, by (1) and (2),
$$
f\left(x^{2}+y\right)=f\left(x^{2}+f(f(y))\right)=f(y)+f^{2}(x) \geqslant f(y) \text {, }
$$

indicating that $f$ is increasing, i.e., for $y^{\prime}\left(=x^{2}+y\right)>y$, we always have
$$
f\left(y^{\prime}\right)>f(y) \text {. }
$$

If there exists $x$ such that $f(x)>x$, then by (2) and (3),
$$
x=f(f(x))>f(x)>x,
$$

which is a contradiction. Therefore, $f(x) \leqslant x$. Similarly, $f(x) \geqslant x$. Hence, $f(x)=x$ is the only mapping that meets the requirements.