This is an example from D&F before Cauchy's theorem and before the Sylow theorems.
They first note that $Z(G) = \{e\}$, as otherwise $G/Z(G)$ is cyclic and therefore abelian. Sure.
They then say that if every nonidentity element has order $p$, then the centralizer of every nonidentity element has index $q$, i.e. order $p$. But I'm having a blind spot and I'm not able to see why the centralizer of such an element can't have order $q$.
Let $x$ be an element of order $p$. (Thus, $x \neq e$.)
The centraliser $C_G(x)$ is the subgroup $C_G(\langle x\rangle)$ (by definition).
Now, note that $\langle x\rangle$ is abelian and hence, $\langle x\rangle \le C_G(x).$
This gives us that $p \mid |C_G(x)|$. (Lagrange's theorem)
Thus, $|C_G(x)| = p$ or $|C_G(x)| = pq$.
However, if the order were $pq$, then we would have $C_G(x) = G$. This would imply that every element of $G$ commutes with $x$.
In turn, this would give us that $x \in Z(G)$. This contradicts the fact that $Z(G) = \{e\} \not\ni x$.
This leaves with the sole possibility that $|C_G(x)| = p$.