Most of the time, "classify all groups of order $n$" is hopeless. For Abelian groups it isn't: there is a complete list, and you can write it down by factoring $n$ and counting. This page states the theorem that makes that possible, shows how to use it, and then proves the finite version. On this page $\mathbb{Z}_n$ means the integers mod $n$ under addition, so $\mathbb{Z}_n \cong C_n$.
FTFGAG isn't an acronym. It's what happens when you sneeze on a keyboard.
The building blocks are cyclic groups: finite ones $\mathbb{Z}_n$, and the infinite one $\mathbb{Z}$. Copies of $\mathbb{Z}$ get a name of their own.
For $r \ge 0$, the group $\mathbb{Z}^r = \mathbb{Z} \times \dots \times \mathbb{Z}$ ($r$ times) is called the free Abelian group of rank $r$.
($\mathbb{Z}^0$ is the trivial group.) The Fundamental Theorem says that every finitely generated Abelian group (F.G.A.G.) is built from these blocks in exactly one tidy way.
If $G$ is a F.G.A.G. then $\exists\, r \ge 0$, $s \ge 0$, and $n_1, \dots, n_s \ge 2$ such that:
Furthermore, $r, s, n_1, \dots, n_s$ are unique.
Condition (ii) is what makes the answer unique. Without it, $\mathbb{Z}_2 \times \mathbb{Z}_3$ and $\mathbb{Z}_6$ would be two different-looking names for the same group. With it, only $\mathbb{Z}_6$ is allowed, because $2 \nmid 3$. The numbers in the theorem have names.
In the theorem above, $r$ is the free rank of $G$.
In the theorem above, $n_1, \dots, n_s$ are the invariant factors of $G$.
There's also a compact way to quote the whole list at once.
If $G$ is a finitely generated Abelian group with invariant factors $n_1, \dots, n_s$ (i.e. $G \cong \mathbb{Z}^r \times \mathbb{Z}_{n_1} \times \mathbb{Z}_{n_2} \times \dots \times \mathbb{Z}_{n_s}$, $n_i \mid n_{i+1}$), then $G$ is of type $(n_1, \dots, n_s)$.
For example, $\mathbb{Z} \times \mathbb{Z} \times \mathbb{Z}_2 \times \mathbb{Z}_6$ has free rank $2$ and is of type $(2, 6)$. A finite group has free rank $0$, since even one copy of $\mathbb{Z}$ makes the group infinite. From here on, we only prove the finite case. The $\mathbb{Z}^r$ part needs different tools and is not proved on this page.
The invariant factors stack everything into as few cyclic groups as possible. The other extreme breaks everything down into cyclic groups of prime-power order. This is the finite-groups version, ignoring free rank $r$.
If $G$ is an Abelian group, $|G| = p_1^{\alpha_1} \cdots p_k^{\alpha_k} < \infty$, $p_1 < p_2 < \dots < p_k$ distinct primes, $\alpha_i \in \mathbb{N}$. Then:
The numbers $p_i^{\beta_{ij}}$ are called the elementary divisors of $G$.
Part (i) splits $G$ up one prime at a time, and part (ii) splits each prime's piece into cyclic groups. Notice that $\beta_{i1} + \beta_{i2} + \dots + \beta_{it_i} = \alpha_i$, since the orders have to multiply to $|G_i| = p_i^{\alpha_i}$. We'll see that both versions of the theorem are equivalent: each list can be computed from the other.
The theorem turns "list every Abelian group of order $n$" into arithmetic. Start with the easiest orders.
List the Abelian groups of order $p$, $p_1 p_2$, and $p_1 p_2 \cdots p_k$ (distinct primes), up to isomorphism.
Each prime appears to the first power, so each $G_i$ has order $p_i$ and must be $\mathbb{Z}_{p_i}$. There is no choice anywhere: an Abelian group of square-free order is cyclic.
The choices come from repeated primes. For a single prime, the only freedom is how to split the exponent.
List the Abelian groups of order $p^2$, $p^3$, and $p^4$.
Each group comes from writing the exponent as a sum: $4 = 3 + 1 = 2 + 2 = 2 + 1 + 1 = 1 + 1 + 1 + 1$. For a single prime the elementary divisors and the invariant factors are the same prime powers; the invariant factor form just lists them in increasing order ($\mathbb{Z}_p \times \mathbb{Z}_{p^3}$ instead of $\mathbb{Z}_{p^3} \times \mathbb{Z}_p$).
Writing a number as a sum, ignoring order, is a classic idea in number theory.
A partition of $k \in \mathbb{N}$ is a way of writing $k$ as a sum of positive integers, ignoring order. The partition function $P(k)$ is the number of partitions of $k$.
So $P(1) = 1$, $P(2) = 2$, $P(3) = 3$, $P(4) = 5$, and Example 2 says:
$P(k)$ grows fast. Hardy and Ramanujan found that $$P(k) \sim \frac{1}{4k\sqrt{3}} \exp\left(\pi\sqrt{\frac{2k}{3}}\right) \quad \text{as } k \rightarrow \infty.$$
$P(100) = 190{,}569{,}292$. That's about 190 million Abelian groups of order $2^{100}$. The Exercise below asks for six. You're welcome.
With several primes, part (i) of the theorem lets each prime choose its partition independently.
Below, each slider sets the exponent of one prime, and each prime's panel shows its partitions as stacks of blocks: a column of $\beta$ blocks is one factor $\mathbb{Z}_{p^\beta}$. Pick one stack per prime to build a group.
Notice that the group is cyclic exactly when every prime picks its one-column stack. That's Example 1 again, now for any $n$: $\mathbb{Z}_n$ is always on the list, and it's the only cyclic one.
List every Abelian group of order $72$, up to isomorphism, in both elementary divisor form and invariant factor form.
$72 = 2^3 \cdot 3^2$, so there are $P(3) \cdot P(2) = 3 \cdot 2 = 6$ groups. The $2$-part is $\mathbb{Z}_8$, $\mathbb{Z}_4 \times \mathbb{Z}_2$, or $\mathbb{Z}_2 \times \mathbb{Z}_2 \times \mathbb{Z}_2$, and the $3$-part is $\mathbb{Z}_9$ or $\mathbb{Z}_3 \times \mathbb{Z}_3$. Combining the largest powers into the last invariant factor, the next largest into the one before, and so on:
$$\begin{array}{ll} \text{Elementary divisors} & \text{Invariant factors} \\ \hline \mathbb{Z}_8 \times \mathbb{Z}_9 & \mathbb{Z}_{72} \\ \mathbb{Z}_8 \times \mathbb{Z}_3 \times \mathbb{Z}_3 & \mathbb{Z}_3 \times \mathbb{Z}_{24} \\ \mathbb{Z}_4 \times \mathbb{Z}_2 \times \mathbb{Z}_9 & \mathbb{Z}_2 \times \mathbb{Z}_{36} \\ \mathbb{Z}_4 \times \mathbb{Z}_2 \times \mathbb{Z}_3 \times \mathbb{Z}_3 & \mathbb{Z}_6 \times \mathbb{Z}_{12} \\ \mathbb{Z}_2 \times \mathbb{Z}_2 \times \mathbb{Z}_2 \times \mathbb{Z}_9 & \mathbb{Z}_2 \times \mathbb{Z}_2 \times \mathbb{Z}_{18} \\ \mathbb{Z}_2 \times \mathbb{Z}_2 \times \mathbb{Z}_2 \times \mathbb{Z}_3 \times \mathbb{Z}_3 & \mathbb{Z}_2 \times \mathbb{Z}_6 \times \mathbb{Z}_6 \end{array}$$In each row the invariant factors divide each other in order ($3 \mid 24$, $2 \mid 36$, $6 \mid 12$, $2 \mid 2 \mid 18$, $2 \mid 6 \mid 6$) and multiply to $72$.
Everything rests on one fact about cyclic groups.
An Exercise on Groups of Order 4–8 proved that $C_m \times C_n$ is cyclic exactly when $(m, n) = 1$. Here it does all the heavy lifting.
If $m, n \in \mathbb{N}$ and $(m, n) = 1$, then $\mathbb{Z}_{mn} \cong \mathbb{Z}_m \times \mathbb{Z}_n$.
Read left to right, it cracks a cyclic group into prime-power pieces. Read right to left, it glues pieces for different primes back together. The first example goes from invariant factors to elementary divisors.
Find the elementary divisor decomposition of $G = \mathbb{Z}_{36} \times \mathbb{Z}_{12} \times \mathbb{Z}_3$.
Scratch work: $|G| = 36 \cdot 12 \cdot 3 = 1296 = 2^4 \cdot 3^4$. We want to write $G \cong G_1 \times G_2$ with $|G_1| = 2^4$, $|G_2| = 3^4$, then further decompose $G_1, G_2$ into products of cyclic groups. Crack each factor with the Fact, then sort by prime:
$$G = \mathbb{Z}_{36} \times \mathbb{Z}_{12} \times \mathbb{Z}_3 \cong (\mathbb{Z}_4 \times \mathbb{Z}_9) \times (\mathbb{Z}_4 \times \mathbb{Z}_3) \times \mathbb{Z}_3 \cong (\mathbb{Z}_4 \times \mathbb{Z}_4) \times (\mathbb{Z}_9 \times \mathbb{Z}_3 \times \mathbb{Z}_3).$$This is $G_1 \times G_2$. The elementary divisors are $4, 4, 9, 3, 3$.
Going the other way, glue together the largest power of each prime, then the next largest, and so on.
Find the invariant factor decomposition of $\mathbb{Z}_{256} \times (\mathbb{Z}_{81} \times \mathbb{Z}_{27} \times \mathbb{Z}_3) \times (\mathbb{Z}_{25} \times \mathbb{Z}_5)$.
The largest powers are $2^8$, $3^4$, $5^2$; the next largest are $3^3$, $5^1$ (the prime $2$ has run out); the last one left is $3^1$. Each group of powers is pairwise coprime, so the Fact glues it into one cyclic group:
$$\mathbb{Z}_{256} \times (\mathbb{Z}_{81} \times \mathbb{Z}_{27} \times \mathbb{Z}_3) \times (\mathbb{Z}_{25} \times \mathbb{Z}_5) \cong \mathbb{Z}_{2^8 \cdot 3^4 \cdot 5^2} \times \mathbb{Z}_{3^3 \cdot 5^1} \times \mathbb{Z}_{3^1}.$$Listed in increasing order, the invariant factors are $3 \mid 135 \mid 518400$.
The general case works the same way. Write the elementary divisors in one row per prime, each row in increasing order and lined up on the right. Multiply down each column to get one invariant factor per column. Reading the columns left to right, every prime power in a column is at most the one to its right, so each invariant factor divides the next one. Going backwards, factoring each invariant factor into prime powers recovers the rows. This is why the two versions of the FTFGAG are equivalent.
Watch it happen. The starting group doesn't even have to be in either form.
The $\mathbb{Z}_{10} \times \mathbb{Z}_{15} \times \mathbb{Z}_6$ preset is worth a second look: three factors went in and two came out, so a different-looking product of cyclic groups can be the same group.
(a) Find the elementary divisors and the invariant factors of $\mathbb{Z}_{12} \times \mathbb{Z}_{18} \times \mathbb{Z}_{30}$.
(b) Is $\mathbb{Z}_4 \times \mathbb{Z}_4 \cong \mathbb{Z}_2 \times \mathbb{Z}_8$?
(a) Crack each factor: $12 = 4 \cdot 3$, $18 = 2 \cdot 9$, $30 = 2 \cdot 3 \cdot 5$. So $$\mathbb{Z}_{12} \times \mathbb{Z}_{18} \times \mathbb{Z}_{30} \cong (\mathbb{Z}_4 \times \mathbb{Z}_2 \times \mathbb{Z}_2) \times (\mathbb{Z}_9 \times \mathbb{Z}_3 \times \mathbb{Z}_3) \times \mathbb{Z}_5,$$ with elementary divisors $4, 2, 2, 9, 3, 3, 5$. (Check: $16 \cdot 81 \cdot 5 = 6480 = 12 \cdot 18 \cdot 30$.) Gluing the largest powers, $4 \cdot 9 \cdot 5 = 180$, then $2 \cdot 3 = 6$, then $2 \cdot 3 = 6$: $$\mathbb{Z}_{12} \times \mathbb{Z}_{18} \times \mathbb{Z}_{30} \cong \mathbb{Z}_6 \times \mathbb{Z}_6 \times \mathbb{Z}_{180},$$ of type $(6, 6, 180)$.
(b) No. Both are already in elementary divisor form, with elementary divisors $4, 4$ and $8, 2$. These lists are different, so by uniqueness the groups are not isomorphic. You can also see it directly: $(0, 1) \in \mathbb{Z}_2 \times \mathbb{Z}_8$ has order $8$, but every element of $\mathbb{Z}_4 \times \mathbb{Z}_4$ satisfies $4(a, b) = (0, 0)$.
Now for the proof of the finite version. We'll prove the elementary divisor decomposition, since the two versions are equivalent. First, a theorem we will use in the proof, and one that is worth knowing in its own right.
The Spicy Bonus on Subgroups & Lagrange's Theorem paired each element with its inverse to find an element of order $2$, and promised that grouping into $p$-tuples would do the same for any prime $p$. Here it is.
If $G$ is a finite group, $p$ is a prime, and $p \mid |G|$, then $G$ contains an element of order $p$.
The converse of Lagrange's theorem is false ($A_4$ has no subgroup of order $6$), so Cauchy's theorem is the participation trophy. A pretty good trophy, though.
Notice that $G$ doesn't have to be Abelian. The proof, due to James McKay, counts one set in two ways.
Proof. Let $S = \{(g_1, \dots, g_p) : g_1, \dots, g_p \in G,\ g_1 \cdots g_p = e\}$. Define $\sim$ on $S$ as follows: $x \sim y \iff x$ and $y$ are cyclic permutations of each other, i.e. $$(g_1, \dots, g_p) \sim (g_2, \dots, g_p, g_1) \sim \dots$$ Rotating stays inside $S$: if $g_1 g_2 \cdots g_p = e$ then $g_2 \cdots g_p = g_1^{-1}$, so $g_2 \cdots g_p g_1 = e$. This is an equivalence relation. Calculate $|S|$ in two ways.
Way 1: by equivalence classes. There are $2$ types of equivalence classes: classes with $1$ element (e.g. $(e, \dots, e)$), and classes with $p$ different elements. To see why, suppose rotating $x = (g_1, \dots, g_p)$ by $j$ places gives $x$ back, for some $0 < j < p$. Then $g_i = g_{i+j}$ for every $i$ (indices mod $p$). Since $p$ is prime, $(j, p) = 1$, so stepping by $j$ visits every index, and all the $g_i$ are equal. So either $x$ is constant, or its $p$ rotations are all different (if rotations by $a$ and $b$ agreed, rotation by $b - a$ would fix $x$). So $$|S| = 1 \cdot (\#\text{ of equiv. classes w/ } 1 \text{ elem.}) + p \cdot (\#\text{ of equiv. classes w/ } p \text{ elems.}) = k + pl.$$ The one-element classes are the constant tuples $(g, \dots, g)$ with $g^p = e$. Note $k \ge 1$, because of $(e, \dots, e)$.
Way 2: directly. $g_1, \dots, g_{p-1}$ can be anything, and then $g_p$ is forced: $$S = \{(g_1, \dots, g_{p-1}, (g_1 \cdots g_{p-1})^{-1}) : g_1, \dots, g_{p-1} \in G\} \implies |S| = |G|^{p-1} = p^{p-1} \cdot m$$ for some $m \in \mathbb{N}$ (since $p \mid |G|$).
Compare the formulas: $$k + pl = p^{p-1} m \implies p \mid k \implies k > 1 \implies \exists\, g \in G \setminus \{e\} \text{ s.t. } g^p = e \implies |g| = p,$$ since $|g|$ divides $p$ and isn't $1$. $\blacksquare$
The necklaces below are the elements of $S$: read clockwise from the top, the beads are $g_1, g_2, \dots, g_p$. Turning a necklace is a cyclic permutation, so an equivalence class is every different-looking necklace you can get by turning one.
Turning necklaces is secretly the group $C_p$ acting on $S$, and the equivalence classes are its orbits. On the upcoming Group Actions page we'll see why orbits always have size dividing $|C_p| = p$, and the trick of counting a set by its orbits comes back as the class equation.
The proof only ever uses one fact about the one-element classes: there are at least $p$ of them. In $S_3$ with $p = 3$, they are $(e, e, e)$, $((1\ 2\ 3), (1\ 2\ 3), (1\ 2\ 3))$, and $((1\ 3\ 2), (1\ 3\ 2), (1\ 3\ 2))$, which hands us the two elements of order $3$.
Recall the setup: $|G| = p_1^{\alpha_1} \cdots p_k^{\alpha_k}$, $p_1 < \dots < p_k$ primes, $\alpha_i \in \mathbb{N}$, and we want to show that $G \cong G_1 \times \dots \times G_k$ with $|G_i| = p_i^{\alpha_i}$. The plan is to show that for every $1 \le i \le k$, $G$ has a unique subgroup $G_i$ of order $p_i^{\alpha_i}$, and then glue them together. There is only one sensible candidate:
$$G_i = \{g \in G : |g| \text{ divides } p_i^{\alpha_i}\}.$$Let $G$ be a finite Abelian group with $|G| = p_1^{\alpha_1} \cdots p_k^{\alpha_k}$. Then each $G_i$ is a subgroup of $G$, $|G_i| = p_i^{\alpha_i}$, and $G_i$ is the only subgroup of $G$ of order $p_i^{\alpha_i}$.
Now glue. For $i \neq j$, $G_i \cap G_j$ is a subgroup of both $G_i$ and $G_j$, so its order divides $p_i^{\alpha_i}$ and $p_j^{\alpha_j}$, and $G_i \cap G_j = \{e\}$. It's tempting to stop there and say the product of all the $G_i$ has $|G_1| \cdots |G_k|$ elements.
Careful: subgroups that meet pairwise in $\{e\}$ do not always give a direct product. In $\mathbb{Z}_2 \times \mathbb{Z}_2$, the three subgroups $\langle (1, 0) \rangle$, $\langle (0, 1) \rangle$, $\langle (1, 1) \rangle$ meet pairwise in $\{(0, 0)\}$, but their product is the whole group, with $4$ elements, not $2 \cdot 2 \cdot 2 = 8$. What saves us here is that the orders are coprime.
The Internal Direct Product Theorem on Isomorphism Theorems handles two subgroups at a time: if $H, K \unlhd G$ and $H \cap K = \{e\}$, then $HK \cong H \times K$. We use it $k - 1$ times.
Finishing part (i). Let $P_j = G_1 G_2 \cdots G_j$. We show by induction on $j$ that $P_j \cong G_1 \times \dots \times G_j$ and $|P_j| = p_1^{\alpha_1} \cdots p_j^{\alpha_j}$. For $j = 1$ there's nothing to do. For the step, $P_j \cap G_{j+1}$ is a subgroup of both, so its order divides $p_1^{\alpha_1} \cdots p_j^{\alpha_j}$ and $p_{j+1}^{\alpha_{j+1}}$, which are coprime. So $P_j \cap G_{j+1} = \{e\}$. Every subgroup of $G$ is normal, so by the Internal Direct Product Theorem and the Product Formula, $$P_{j+1} = P_j G_{j+1} \cong P_j \times G_{j+1} \cong G_1 \times \dots \times G_{j+1}, \qquad |P_{j+1}| = |P_j| \cdot |G_{j+1}|.$$ At $j = k$, $|G_1 \cdots G_k| = |G_1| \cdots |G_k| = |G|$, so $G_1 \cdots G_k = G$ and $G \cong G_1 \times \dots \times G_k$. $\blacksquare$
Each $G_i$ only contains elements whose orders are powers of $p_i$. Groups like that come up constantly, so they get a name, along with a few more definitions.
Let $p$ be a prime. A group $G$ is called a $p$-group if $\forall\, g \in G$, $\exists\, k \in \mathbb{N}$ such that $g^{p^k} = e$.
So every $G_i$ is a $p_i$-group. A finite Abelian $p$-group always has order $p^n$ for some $n$: if another prime $q$ divided its order, Cauchy's theorem would give an element of order $q$, and $q$ is not a power of $p$.
The exponent of a group $G$ is the smallest non-zero $x \in \mathbb{N}$ such that $\forall\, g \in G$, $g^x = e$ (or $\infty$ if no such $x$ exists).
A finite elementary Abelian group is an Abelian group with exponent $p$, for some prime $p$.
The basic examples are $\mathbb{Z}_p, \mathbb{Z}_p \times \mathbb{Z}_p, \dots$: every non-identity element has order exactly $p$.
Find the exponent of $\mathbb{Z}_4 \times \mathbb{Z}_6$, of $S_3$, and of $\mathbb{Z}$. Which of $\mathbb{Z}_2 \times \mathbb{Z}_2 \times \mathbb{Z}_2$ and $\mathbb{Z}_2 \times \mathbb{Z}_4$ is elementary Abelian?
For a finite Abelian group the exponent is easy to read off once you have the invariant factors.
Let $G$ be a finite Abelian group of type $(n_1, \dots, n_s)$. Prove that the exponent of $G$ is $n_s$, and conclude that $G$ is cyclic if and only if $s \le 1$.
Proof. $G$ is finite, so its free rank is $0$ and $G \cong \mathbb{Z}_{n_1} \times \dots \times \mathbb{Z}_{n_s}$. Isomorphic groups have the same exponent, so we compute it for the product, written additively.
Since $n_i \mid n_{i+1}$ for each $i$, every $n_i$ divides $n_s$. So for any $(a_1, \dots, a_s)$, $$n_s (a_1, \dots, a_s) = (n_s a_1, \dots, n_s a_s) = (0, \dots, 0).$$ So the exponent is at most $n_s$. On the other hand, if $x(a_1, \dots, a_s) = 0$ for every element, then in particular $x(0, \dots, 0, 1) = (0, \dots, 0, x) = 0$, so $n_s \mid x$ and $x \ge n_s$. So the exponent is $n_s$.
A finite group is cyclic exactly when it has an element of order $|G|$. Every element's order divides the exponent $n_s$, and $(0, \dots, 0, 1)$ has order $n_s$, so $G$ is cyclic $\iff n_s = |G| = n_1 \cdots n_s \iff n_1 \cdots n_{s-1} = 1$. Each $n_i \ge 2$, so this happens exactly when there is no $n_1, \dots, n_{s-1}$ at all, i.e. $s \le 1$. ($s = 0$ is the trivial group.) $\blacksquare$
Let $G$ be a finite Abelian $p$-group. The idea is to peel off one cyclic factor at a time: take an element $g$ of the largest possible order, and find a subgroup $K$ that fills in the rest of $G$ without overlapping $\langle g \rangle$. Such a $K$ is called a complement of $\langle g \rangle$.
Try it first. The groups below are written additively, so $e = (0, 0)$, and $\langle g \rangle$ is shaded blue. "Maximal order" turns out to matter: watch the last mission.
In the first three missions $g$ had maximal order, and a complement was always there. The Lemma says that's no accident.
If $G$ is a finite Abelian $p$-group and $g \in G$ is an element of maximal order in $G$, then $\exists\, K \le G$ such that:
The proof is by induction on the order of $G$. The induction runs through the quotient $G/H$ for a well-chosen subgroup $H$, and the hard part is choosing $H$; that is the Claim inside the proof.
Proof of the Lemma. Write $|G| = p^n$. Proof by induction on $n$. (If $n = 0$, $G = \{e\}$ and $K = \{e\}$ works.)
Base case ($n = 1$): $|G| = p$; let $g \in G \setminus \{e\}$ and $K = \{e\}$. $\checkmark$
Inductive hypothesis: suppose the Lemma is true for all groups of order at most $p^{n-1}$.
Inductive step: suppose $|G| = p^n$, and let $g \in G$ have maximal order. If $|g| = p^n$, then $G = \langle g \rangle$; take $K = \{e\}$ and we're done. So suppose $|g| = p^l$ for some $1 \le l < n$.
Claim: there is a subgroup $H \le G$, $|H| > 1$, satisfying (i) $\langle g \rangle \cap H = \{e\}$, and (ii) $|gH| = p^l$ in $G/H$.
Assuming the Claim: first note that $gH$ is an element of maximal order in $G/H$. Indeed, for any $yH \in G/H$, $(yH)^{|y|} = y^{|y|}H = H$, so $|yH| \le |y| \le p^l = |gH|$. Also $|G/H| = |G|/|H| < |G|$, and $G/H$ is again an Abelian $p$-group. So by the inductive hypothesis, $\exists\, \overline{K} \le G/H$ such that $G/H \cong \langle gH \rangle \times \overline{K}$ and $\langle gH \rangle \cap \overline{K} = \{eH\}$. By the 4th Isomorphism Theorem, $\exists\, K \le G$ with $H \le K$ such that $\overline{K} = K/H$.
Subclaim: $\langle g \rangle \cap K = \{e\}$.
Proof. Suppose $x \in \langle g \rangle \cap K$. Then $xH \in \langle gH \rangle \cap K/H = \langle gH \rangle \cap \overline{K} = \{eH\}$, so $x \in H$. So $x \in \langle g \rangle \cap H = \{e\}$, and $x = e$. $\checkmark$
Now count. $G/H \cong \langle gH \rangle \times K/H$, so $$|G/H| = |\langle gH \rangle| \cdot |K/H| \implies \frac{|G|}{|H|} = |g| \cdot \frac{|K|}{|H|} \implies |G| = |\langle g \rangle| \, |K|.$$ By the Product Formula and the Subclaim, $|\langle g \rangle K| = |\langle g \rangle| |K| = |G|$, so $\langle g \rangle K = G$. Both subgroups are normal ($G$ is Abelian) and they meet in $\{e\}$, so by the Internal Direct Product Theorem, $G = \langle g \rangle K \cong \langle g \rangle \times K$. So this proves the Lemma, assuming the Claim. $\checkmark$
Proof of the Claim. Since $|g| = p^l < p^n$, $G \neq \langle g \rangle$. Let $h \in G \setminus \langle g \rangle$ be an element of smallest possible order. Note $|h| = p^i$ for some $1 \le i \le l$ ($h \neq e$, and $g$ has maximal order). Then $$|h^p| = \frac{|h|}{\gcd(|h|, p)} = \frac{|h|}{p} < |h| \implies h^p \in \langle g \rangle,$$ by the choice of $h$. So $h^p = g^a$ for some $a \in \mathbb{N}$. Next, $|h^p| = |h|/p \le p^l/p < |g|$, and also $$|h^p| = |g^a| = \frac{|g|}{\gcd(|g|, a)}.$$ So $\gcd(p^l, a) > 1$, which means $p \mid a$, and $h^p = g^{bp}$ for some $b \in \mathbb{N}$. Let $x = g^{-b} h \in G$. Then:
In particular $x \neq e$, so $|x| = p$. Take $H = \langle x \rangle$. Then $|H| = p > 1$, and:
Mission 4 shows where the proof needs maximal order. There, $g = (2, 0)$ and $H = \langle (0, 1) \rangle$ still satisfy the Claim, but $G/H \cong \mathbb{Z}_4$, and $gH$ has order $2$ while $(1, 0) + H$ has order $4$. So $gH$ is not of maximal order in $G/H$, and the inductive hypothesis has nothing to say about it.
Finishing part (ii). Each $G_i$ from part (i) is a finite Abelian $p_i$-group of order $p_i^{\alpha_i}$. Pick $g_1 \in G_i$ of maximal order $p_i^{\beta_{i1}}$. The Lemma gives $G_i \cong \langle g_1 \rangle \times K_1 \cong \mathbb{Z}_{p_i^{\beta_{i1}}} \times K_1$, where $K_1$ is a smaller Abelian $p_i$-group. Now pick $g_2 \in K_1$ of maximal order $p_i^{\beta_{i2}}$ and apply the Lemma to $K_1$, and so on. Each $K_j$ is a subgroup of $G_i$, so its largest order is at most the previous one, giving $\beta_{i1} \ge \beta_{i2} \ge \cdots$. The orders shrink every time, so the process stops (at $K_{t_i} = \{e\}$) with $$G_i \cong \mathbb{Z}_{p_i^{\beta_{i1}}} \times \mathbb{Z}_{p_i^{\beta_{i2}}} \times \dots \times \mathbb{Z}_{p_i^{\beta_{it_i}}}. \qquad \blacksquare$$
Part (ii) also settles elementary Abelian groups completely.
Prove that every elementary Abelian group of order $p^k$ is isomorphic to $\mathbb{Z}_p^{\,k} = \mathbb{Z}_p \times \dots \times \mathbb{Z}_p$ ($k$ times).
Proof. Let $G$ be elementary Abelian with exponent $p$ and $|G| = p^k$. Then $g^p = e$ for every $g \in G$, so $G$ is a $p$-group, and $G$ is its own $G_1$ in part (i). By part (ii), $$G \cong \mathbb{Z}_{p^{\beta_1}} \times \dots \times \mathbb{Z}_{p^{\beta_t}}, \qquad \beta_1 \ge \dots \ge \beta_t \ge 1.$$ The factor $\mathbb{Z}_{p^{\beta_1}}$ contains an element of order $p^{\beta_1}$, so $G$ does too. But every element of $G$ has order dividing $p$, so $p^{\beta_1} \le p$ and $\beta_1 = 1$. Then every $\beta_j = 1$, and $p^t = |G| = p^k$ gives $t = k$. So $G \cong \mathbb{Z}_p^{\,k}$. $\blacksquare$
Uniqueness of the decomposition $G \cong G_1 \times \dots \times G_k$ in part (i) follows from the construction we gave: $G_i$ had to be the unique subgroup of order $p_i^{\alpha_i}$, namely $\{g \in G : |g| \text{ divides } p_i^{\alpha_i}\}$, and that set is determined by $G$ alone.
Uniqueness of the decomposition in part (ii) follows from comparing elements of given orders. For example, $\mathbb{Z}_{p^2} \times \mathbb{Z}_{p^2}$ and $\mathbb{Z}_{p^3} \times \mathbb{Z}_p$ both have order $p^4$, but only the second has an element of order $p^3$. In general, counting the elements with $g^{p^j} = e$ for each $j$ recovers every $\beta_{ij}$. Making that precise is the Spicy Bonus.
Part (iii) of the theorem was only sketched. Here it is for you to prove.
Let $p$ be prime. Suppose $$\mathbb{Z}_{p^{\beta_1}} \times \dots \times \mathbb{Z}_{p^{\beta_t}} \cong \mathbb{Z}_{p^{\gamma_1}} \times \dots \times \mathbb{Z}_{p^{\gamma_u}},$$ where $\beta_1 \ge \dots \ge \beta_t \ge 1$ and $\gamma_1 \ge \dots \ge \gamma_u \ge 1$. Prove that $t = u$ and $\beta_j = \gamma_j$ for every $j$.
Hint: for a group $G$, count the elements of $G[p^j] = \{g \in G : g^{p^j} = e\}$.
Proof. $|G[p^j]|$ is an invariant. If $\phi : G \rightarrow G'$ is an isomorphism, then $g^{p^j} = e \iff \phi(g)^{p^j} = \phi(g^{p^j}) = e$, so $\phi$ maps $G[p^j]$ bijectively onto $G'[p^j]$, and $|G[p^j]| = |G'[p^j]|$ for every $j \ge 0$.
Computing it. Write $\mathbb{Z}_{p^\beta}$ additively. An element $a$ has $p^j a \equiv 0 \pmod{p^\beta}$ exactly when $p^{\beta - \min(j, \beta)}$ divides $a$, and there are $p^{\min(j, \beta)}$ such $a$ in $\mathbb{Z}_{p^\beta}$. In a direct product, $p^j(a_1, \dots, a_t) = 0$ exactly when each coordinate satisfies it, so for $G = \mathbb{Z}_{p^{\beta_1}} \times \dots \times \mathbb{Z}_{p^{\beta_t}}$, $$|G[p^j]| = p^{\min(j, \beta_1) + \dots + \min(j, \beta_t)}.$$
Reading off the $\beta$'s. Let $c_j = \#\{i : \beta_i \ge j\}$. Going from $j - 1$ to $j$, the term $\min(j, \beta_i)$ goes up by $1$ exactly when $\beta_i \ge j$, so $$\log_p |G[p^j]| - \log_p |G[p^{j-1}]| = c_j \quad (j \ge 1).$$ So the numbers $c_1, c_2, \dots$ are determined by the isomorphism class of $G$. They determine the $\beta$'s: $t = c_1$, and the number of $i$ with $\beta_i = j$ is $c_j - c_{j+1}$. The same numbers $c_j$ come from the $\gamma$'s, because the two products are isomorphic. So both lists contain each value $j$ equally often, and since both are sorted in decreasing order, $t = u$ and $\beta_j = \gamma_j$ for all $j$. $\blacksquare$
Together with the uniqueness of the $G_i$, this proves part (iii): two finite Abelian groups are isomorphic if and only if they have the same elementary divisors.