We consider $F=\mathbb F_p$ for $p$ prime, $f(x)$ an irreducible polynomial of degree $m$ over $F$ and $g(x)=x^{p^m}-x$. I want to show that $f(x)\mid g(x)$.
From the fact that the field $A=F[x]/(f)$ which has $p^m$ elements how does the $f(x)|g(x)$ follows?
The multiplicative group $A^*$ of $A$ has order $p^m-1$. Since $f$ irreducible and assuming $m>1$ we have that $x\not\in (f)$, so $x+(f)$ is a non-zero element of $A^*$ and by Lagrange we have that $x^{p^m-1}+(f)=(x+(f))^{p^m-1}=1_F+(f)$. Then $g(x)+(f)=x(x^{p^m-1}-1_F)+(f)=(f)$ the zero element in $A$ which means that $f(x)|g(x)$.