By Fermat's little theorem, we know if $p$ is a prime number, we have: $$a^p\equiv a\,\,\,(\text{mod }p).$$ We know in a finite field $F$ of order $p$ when $p$ is prime, characteristic of $F$ is $p$. So, using Fermat's little theorem $a^p=xp+a$ for some $x$. This means $a^p=a$ in $F$. This shows that all elements of $F$ satisfy the polynomial $X^p-X=0$. As this equation has $p$ roots, we conclude all the elements of $F$ are roots of this equation or conversely all the roots of this equation are elements of $F$.
At this point, I appreciate any corrections if I have any mistakes in the previous claims.
Now, a more general claim is that for every field $F$ of order $p^n$ when $p$ is prime, every element of $F$ satisfies the polynomial $X^{p^n}-X=0$. But I can't understand how this is concluded. Because, here $p^n$ is not a prime number. Any explanation of why this is correct is apprecaited!