Example 1 Find all continuous functions $f(x)$ that satisfy the condition for any $x, y$ in $\mathbf{R}$
$$
f(x+y)=f(x)+f(y)
$$
It is easy to see that the linear function
$f(x)=c x$ (where $c$ is a constant)
satisfies the conditions of the problem.
Next, we prove that function (2) is the unique solution to equation (1), i.e., any solution $f(x)$ of equation (1) must have the form (2).
By induction, we get
$$
f\left(x_{1}+x_{2}+\cdots+x_{n}\right)=f\left(x_{1}\right)+f\left(x_{2}\right)+\cdots+f\left(x_{n}\right) \text {. }
$$

In the above equation, let $x_{1}=x_{2}=\cdots=x_{n}=x$, then $f(n x)=n f(x)$.
Substituting $x$ with $\frac{x}{n}$ in the above equation, we get
$$
f(x)=n f\left(\frac{x}{n}\right) \Rightarrow f\left(\frac{x}{n}\right)=\frac{1}{n} f(x) \text {. }
$$

Substituting $x$ with $m x$ in equation (3), we get
$$
f\left(\frac{m}{n} x\right)=\frac{1}{n} f(m x)=\frac{m}{n} f(x) \text {. }
$$

Also, by setting $x=y=0$ in the condition equation (1), we get
$$
f(0+0)=f(0)+f(0) \Rightarrow f(0)=0 .
$$

Taking $y=-x$, then from equation (1) we get
$$
\begin{array}{l}
f(0)=f(x)+f(-x) \\
\Rightarrow f(-x)=-f(x) .
\end{array}
$$

Combining equation (4), we get $f\left(-\frac{m}{n} x\right)=-\frac{m}{n} f(x)$.
Therefore, for any rational number $r$, we have
$$
f(r x)=r f(x) \text {. }
$$

If we take $x=1$ and denote $f(1)=c$, this equation becomes $f(r)=c r$ (where $r$ is any rational number).
Now consider the case of irrational numbers.
For any irrational number $t$, take any sequence of rational numbers $\left\{r_{n}\right\}$ that converges to $t$.
From equation (5), we get $f\left(r_{n}\right)=c r_{n}$.
Let $n \rightarrow+\infty$. Then
$$
\lim _{n \rightarrow+\infty} f\left(r_{n}\right)=\lim _{n \rightarrow+\infty} c r_{n}=c t \text {. }
$$

By the continuity of the function $f(x)$, we know
$$
\lim _{n \rightarrow+\infty} f\left(r_{n}\right)=f(t) \Rightarrow f(t)=c t \text {. }
$$

Combining equations (5) and (6), we know that for any real number $x$, we have $f(x)=c x$ (where the constant $c=f(1))$.