Let $p$ be prime. If the order of $a$ modulo $p$ is $k$, show that
$$ k \mid (p− 1) $$
We're given
$$ a^k \equiv 1 \pmod p $$
Since $\gcd(p,a)=1$, because the order exists, Euler's Theorem tells us
$$ a^{\phi(p)} \equiv a^{p-1} \equiv 1 \pmod p $$
Since $k$ is the smallest positive integer such that $a^k \equiv 1 \pmod n$, then $(p-1)$ is a multiple of $k$.
That is,
$$ k \mid (p-1) $$