See the Wikipedia article on finitely-generated abelian groups for more information. We have
Theorem A. Any finite abelian group $G$ admits a unique invariant factor decomposition.
Theorem B. Any finite abelian group $G$ admits a unique primary decomposition.
These decompositions are different, but logically Thm A $\Leftrightarrow$ Thm B: that is, once you prove one, the other follows from Sun-Ze (aka CRT), ${\bf Z}/nm\cong {\bf Z}/n\times{\bf Z}/m$ when $(n,m)=1$. Further one can compute one decomposition from the other (+ vice-versa). Let's discuss how.
Suppose we have the invariant factor decomposition of $G$ from Thm A as follows:
$$G\cong \frac{\bf Z}{n_1}\times\frac{\bf Z}{n_2}\times\cdots\times\frac{\bf Z}{n_l}.$$
Then each $n_i$ factors as $\prod_pp^{e(i,p)}$ for primes $p$ and exponents $e(i,p)$. By SZ then
$$G\cong\prod_{i=1}^l\frac{\bf Z}{n_l}\cong\prod_{i=1}^l\prod_p\frac{\bf Z}{p^{e(i,p)}}\cong\prod_p\left[\prod_{i=1}^l\frac{\bf Z}{p^{e(i,p)}}\right].$$
Notice the factors $\prod_{i=1}^l{\bf Z}/p^{e(i,p)}$ are $p$-groups; this is the primary decomposition, which is the same as the Sylow decomposition (as a direct product of Sylow $p$-subgroups, available for all nilpotent groups) when our group is abelian. It is probably best to think of Sylow theory as the inevitable noncommutative generalization of arithmetic in the theory of finitely-generated abelian groups.
Our original hypothesis that we had the invariant factor decomposition means that $n_i\mid n_{i+1}$, so we must have $e(i,p)\le e(i+1,p)$ for each $p$. Also, some of the $e$'s may be $0$. Thus if we begin with a primary decomposition as regarded in Thm B, we may order the prime exponents in an increasing order, and fill in extra $0$s as needed so that each prime has the same number of exponents, then form the $n_i$ out of the prime powers created from these exponents.
Here's an example. From a primary decomposition we obtain
$$\begin{array}{llccccc} G & \cong & \left(\frac{\bf Z}{2} \times \frac{\bf Z}{2}\times\frac{\bf Z}{8}\right) & \times & \left(\frac{\bf Z}{3}\times\frac{\bf Z}{27}\right) & \times & \left(\frac{\bf Z}{5}\right) \\ & \cong & \left(\color{Magenta}{\frac{\bf Z}{2}} \times \color{Blue}{\frac{\bf Z}{2}} \times \color{Green}{\frac{\bf Z}{8}} \right) & \times & \left(\color{Magenta}{\frac{\bf Z}{1}} \times \color{Blue}{\frac{\bf Z}{3}} \times \color{Green}{\frac{\bf Z}{27}} \right) & \times & \left(\color{Magenta}{\frac{\bf Z}{1}} \times \color{Blue}{\frac{\bf Z}{1}} \times \color{Green}{\frac{\bf Z}{5}} \right) \\ & \cong & \left(\color{Magenta}{\frac{\bf Z}{2}\times\frac{\bf Z}{1}\times\frac{\bf Z}{1}} \right) & \times & \left( \color{Blue}{\frac{\bf Z}{2}\times\frac{\bf Z}{3}\times\frac{\bf Z}{1}} \right) & \times & \left( \color{Green}{\frac{\bf Z}{8}\times\frac{\bf Z}{27}\times\frac{\bf Z}{5}} \right) \\ & \cong & \frac{\bf Z}{2\times1\times1} & \times & \frac{\bf Z}{2\times3\times1} & \times & \frac{\bf Z}{8\times27\times5} \\[7pt] & \cong & {\bf Z}/2 & \times & {\bf Z}/6 & \times & {\bf Z}/1080 \end{array}$$
as our invariant factor decomposition, with $2\mid6\mid1080$. And to see how to go in reverse with this same example, just read from bottom to top.
In conclusion, then, there are two standard fundamental representations of a finite abelian group, the invariant-factor decomposition and the primary decomposition. Theorems A and B state their existence and uniqueness; these are roughly logically equivalent using the remainder theorem, and it is relatively easy to move between the two decompositions using prime factorization. The IF representation invokes linear algebra, the primary decomposition invokes group theory (it is positioned within Sylow theory), and they are both positioned within commutative algebra.
Best Answer
Here's a different approach:
Theorem: Let $A$ be an abelian group and suppose $A$ is generated by $a, b$, where $a$ and $b$ have finite order. Then $A$ is isomorphic to the product of two cyclic groups.
Proof: Take generators $a$ and $b$ of $A$, and write $C = \langle a \rangle \subset A$. $A /C$ is cyclic with generator $c = \overline{b}$. There is a canonical quotient map $\pi : A \rightarrow A/C$. $\pi (b) = c$. $c$ is a generator of $A/C$. The order of $b$ is divisible by the order of $A/C$. To see this, note that $\pi$ induces a surjective map $\pi' : \langle b \rangle \rightarrow A/C$, so that $|A/C| \cdot |\ker(\pi')| = \text{ord}(b)$. Write $\text{ord}(b) = n$ and $|A/C| = m$, and take $k \in \mathbb{N}$ such that $mk = n$. $b^k$ then has order $m$ and $\phi(b^k)$ is a generator of $A/C$ (why?).
We show that $\langle b^k \rangle \cap \langle a \rangle = \{ e \}$ and $\langle b^k \rangle \langle a \rangle = A$. Suppose $b^{ki} = a^j$ for some $i, j \in \mathbb{N}$. Applying $\pi$, we see that $c^i = e$, so that $i$ is divisible by $m$. Then $ki$ is divisible by $n$, so that $b^{ki} = e$. Then $b^{ki} = a^j = e$. So $\langle b^k \rangle \cap \langle a \rangle = \{ e \}$. To see that $\langle b^k \rangle \langle a \rangle = A$, take $x \in A$, and take $i$ such that $\pi (x) = c^i$. Then $xb^{-ki} = c^i c^{-i} = e$. We can write $xb^{-ik} = a^j$ since $xb^{-ik} \in \ker(\pi)$. Then $x = a^j b^{ik}$.
It follows from a well known characterization of direct products that $A \cong \langle b^k \rangle \times \langle a \rangle$. Therefore $A$ is the product of two cyclic groups.
Note: Here's some intuition concerning direct products that might help. Suppose we have a quotient map $\pi: A \rightarrow B$. When is $A$ isomorphic to the direct product of $B$ and $\ker(\pi)$? It turns out that this is true whenever there is another map $\iota : B \rightarrow A$ such that $\pi \circ \iota = \text{Id}_B$. It is a good exercise to verify this (and it's similar to the proof above). In our case, we created such a situation as this by taking $\langle a \rangle = \ker(\pi)$, $B = A / \langle a \rangle$, and $\pi : A \rightarrow B$ the canonical quotient map. The rest of what we showed was actually equivalent to showing that we have a map $\iota : B \rightarrow A$ ($\iota : B \rightarrow A$ would send $c$ to $b^k$).
Note: This is actually a specific case of a much more general theorem. All finitely generated abelian groups have a decomposition into a product of cyclic groups (note $\mathbb{Z}$ is cyclic). You can read about the most general formulation of this, in terms of finitely generated modules over a PID, here.