Example 12 Find all polynomials $P(x)$ that satisfy $x P(x-1) \equiv (x-2) P(x) \, (x \in \mathbf{R})$.
Solving: Substituting 0,2 into the identity in the problem, we know that the polynomial has roots 0 and 1, i.e., it is divisible by the polynomial $x^{2}-x$. Next, substituting $P(x)=\left(x^{2}-x\right) Q(x)$ into the identity, we know that the polynomial $Q(x)$ satisfies the identity $Q(x)=$ $Q(x-1)$, from which we get $Q(0)=Q(1)=Q(2)=\cdots$ Therefore, $Q(x)=a$ (a constant), so the polynomial we are looking for is $P(x)=a\left(x^{2}-x\right)$.
Conversely, it is easy to verify that all such polynomials also satisfy the identity in the problem.