How to prove the following about a group G? How does one prove that:

for all $a\in G$, where $G$ is a group (not necessarily abelian) $a^{|G|} = 1_G$. 

 A: First, your restrict yourself to finite groups (otherwise, the statement does not make sense).
Then, you apply Lagrange's Theorem to the subgroup $\langle a \rangle$ to conclude that the order of $a$ divides $|G|$.
A: This is a standard fact, which i think is proved in All abstract algebra books. Here is the proof, given in the book by Herstein. See Corollary 2.
Corollary 1: If $G$ is a finite group, and $a \in G$, then $o(a) \mid o(G)$.
Proof. Consider the cyclic subgroup generated by $a$, consisting of $a,a^{2},a^{3},\cdots,$.  Since $a^{o(a)}=e$, therefore, this subgroup has atmost $o(a)$ elements. If it has fewer elements, then $a^{i}=a^{j}$, for some integers $0 \leq i < j < o(a)$. Then $a^{j-i}=e$, yet $0< j-i < o(a)$, which contradicts the meaning of $o(a)$. Thus the cyclic subgroup generated by $a$ has $o(a)$ elements, and hence by Lagrange's theorem $o(a) \mid o(G)$.
Corollary 2: If $G$ is a finite group and $a \in G$, then $a^{o(G)}=e$.
Proof. By Corollary 1, we have $o(a) \mid o(G)$ which implies $o(G)=k \cdot o(a)$, therefore $a^{o(G)}=a^{k \cdot o(a)} = (a^{o(a)})^{k} = e^{k}=e$.
