Example 6 Solve the system of equations $\left\{\begin{array}{l}x_{1}+x_{2}+\cdots+x_{n}=n \\ x_{1}^{2}+x_{2}^{2}+\cdots+x_{n}^{2}=n \\ \cdots \\ x_{1}^{n}+x_{2}^{n}+\cdots+x_{n}^{n}=n\end{array}\right.$.
Analyze the construction of the polynomial $f(x)=\left(x-x_{1}\right)\left(x-x_{2}\right) \cdots\left(x-x_{n}\right)=x^{n}-\sigma_{1} x^{n-1}+\sigma_{2} x^{n-2}-\cdots+$ $(-1)^{n} \sigma_{n}$,

Let $s_{k}=x_{1}^{k}+x_{2}^{k}+\cdots+x_{n}^{k}(1 \leqslant k \leqslant n)$, then by the given condition $s_{k}=n$. Using Newton's formulas, we can find the roots of $f(x)$.

Solution: Construct the polynomial $f(x)=\left(x-x_{1}\right)\left(x-x_{2}\right) \cdots\left(x-x_{n}\right)=x^{n}-\sigma_{1} x^{n-1}+\sigma_{2} x^{n-2}-\cdots+$ $(-1)^{n} \sigma_{n}$, and let $s_{k}=x_{1}^{k}+x_{2}^{k}+\cdots+x_{n}^{k}(1 \leqslant k \leqslant n)$. By Newton's formulas, we get $s_{n}-\sigma_{1} s_{n-1}+\cdots+$ $(-1)^{n-1} \sigma_{n-1} s_{1}+(-1)^{n} n \sigma_{n}=0$.
Noting that $s_{k}=n(1 \leqslant k \leqslant n)$,
we have $1-\sigma_{1}+\sigma_{2}-\cdots+(-1)^{n} \sigma_{n}=0$,
which means $f(1)=0$, so 1 is a root of $f(x)$.
Assume $x_{n}=1$, substituting into the system of equations, we get the $(n-1)$-variable case of the system of equations. Applying the same method to $x_{1}, x_{2}, \cdots, x_{n-1}$, and continuing this process, we find that $x_{1}=x_{2}=\cdots=x_{n}=1$. This is the unique solution to the system of equations.