Example 10 Let $k$ be a positive integer, find all polynomials $P(x)=a_{n} x^{n}+a_{n-1} x^{n-1}+\cdots+a_{0}$, where $a_{i}$ are real numbers, satisfying the equation $P(P(x))=[P(x)]^{k}$.
(1975 Canadian Olympiad Problem)
If $P(x)$ is the zero polynomial, then it satisfies the problem.
When $P(x)$ is a non-zero polynomial, let $\operatorname{deg} P(x)=n$, then $\operatorname{deg} P(P(x))=n^{2}, \operatorname{deg}[P(x)]^{k}=$ $n k$, comparing the degrees of the polynomials on both sides of the given equation, we get $n^{2}=n k$.
(i) If $n=0$, then $P(x)=c$ (a constant) When $k=1$, $c$ can be any non-zero real number; when $k$ is a positive even number, $c=1$; when $k$ is an odd number greater than 1, $c= \pm 1$.
(ii) If $n>0$, then $n=k$, let $P(x)=a_{k} x^{k}+a_{k-1} x^{k-1}+\cdots+a_{0}\left(a_{k} \neq 0\right)$, then we have $a_{k}\left(a_{k} x^{k}+\cdots+a_{0}\right)^{k}+a_{k-1}\left(a_{k} x^{k}+\cdots+a_{0}\right)^{k-1}+\cdots+a_{0}=\left(a_{k} x^{k}+\cdots+a_{0}\right)^{k}$.
Comparing the coefficients of the highest degree terms on both sides, we get $a_{k}^{k+1}=a_{k}^{k}$, hence $a_{k}=1$, so the above equation becomes
$$
a_{k-1}\left(a_{k} x^{k}+\cdots+a_{0}\right)^{k-1}+\cdots+a_{0} \equiv 0 \text {, }
$$

Therefore, $a_{k-1}=a_{k-2}=\cdots=a_{1}=a_{0}=0$, hence $P(x)=x^{k}$.