Example 14 Find all $f: \mathbf{N} \rightarrow \mathbf{N}$, such that for any $n \in \mathbf{N}$, we have
$$
\frac{1}{f(1) f(2)}+\frac{1}{f(2) f(3)}+\cdots+\frac{1}{f(n) f(n+1)}=\frac{f(f(n))}{f(n+1)}
$$
Given that $\frac{1}{1 \times 2}+\frac{1}{2 \times 3}+\cdots+\frac{1}{n(n+1)}=\frac{n}{n+1}$, so $f(n)=n$ is a solution.
For $n=1$, we have $f(f(1)) f(1)=1$. Therefore, $f(1)=1$. Replacing $n$ with $n+1$, we get
$$
\frac{f(f(n))}{f(n+1)}+\frac{1}{f(n+2) f(n+1)}=\frac{f(f(n+1))}{f(n+2)}.
$$

That is,
$$
f(f(n)) f(n+2)+1=f(f(n+1)) f(n+1).
$$

If $f(n+1)=1$, then $f(f(n+1))=1$. Thus, $f(f(n)) f(n+2)=0$. This is impossible. Therefore, $f(n)>1$ for $n>1$.
Proof by induction: $f(f(n))1=f(f(1))$, which holds.
If $f(n+1)>f(f(n))$, then $f(n+1) \geqslant f(f(n))+1$.
Thus, $f(f(n)) f(n+2)+1 \geqslant f(f(n+1)) f(f(n))+f(f(n+1))$.
Since $n+1>1 \cdot f(n+1)>1$, we have $f(f(n+1))>1$, i.e., $f(n+2)>f(f(n+1))$, so $f$ satisfies $f(n+1)>f(f(n))$.
Next, we prove that for any function satisfying $f(n+1)>f(f(n)), n \in \mathbf{N}$, it must be that $f(n)=n$.
Consider the set $\{f(f(1)), f(2), f(f(2)), f(3), f(f(3)), \cdots, f(n), f(f(n)), \cdots\}$,
then this set has a smallest element. Since $f(n+1)>f(f(n))$, the smallest element cannot be $f(n+1)$, so it must be of the form $f(f(n))$.
If there exists $n$ such that $f(n)=1$, then $n=1$, otherwise $1=f(n)>f(f(n+1))$, which is impossible.
Therefore, $f(1)=1$, and $f(n)>1$ for $n>1$.
Consider $f:\{n \geqslant 2\} \rightarrow\{n \geqslant 2\}$. Similarly, we can argue that $f(2)=2, f(n)>2$,
for $n>2$. By induction, we can prove: $f(k)=k$, and for $n>k$, $f(n)>k$.
Hence, the only solution to this problem is $f(n)=n, n \in \mathbf{N}$.