The question doesn't involve research-level mathematics (and therefore might not be appropriate for MO?), but since it's been voted up by a couple of people I'll make a few comments. First of all, it's best to consult a standard advanced textbook on algebra such as Dummit & Foote, since the full proof of the structure theorem takes a number of steps to develop. (Eisenbud's book is a less natural starting point.) I'll outline briefly the way I see it.

For one step, the breaking off of a free summand requires a separate argument, as does the proof that the rank of this (finitely genereated) summand is determined by the given group.

The question asked here concerns only the *torsion* subgroup, which is itself finitely generated and a direct summand. Here the primary decomposition is just the first (and technically easier) step, using the decomposition of the group order into prime powers for various primes. Essentially all you are doing is decomposing the group into a direct sum (= product) of its Sylow subgroups, as you could do more generally in a finite nilpotent group.

The harder part is to work with a fixed prime and determine all possible ways in which a group of given prime power order can be further decomposed. It turns out to be possible to break the group down into a direct sum of *cyclic* groups, whose orders are moreover uniquely determined by the given group.

However all of this is done, it takes some real work but is now classical. The interesting mathematical point is that the arguments generalize well to finitely generated modules over arbitrary principal ideal domains (the case of a euclidean domain being easier to work out constructively). The contrasting elementary example involves the rational canonical form of a linear operator on a finite dimensional vector space over an arbitrary field: here the algebra of polynomials plays the role of $\mathbb{Z}$ and the resulting module is finitely generated but torsion. The characteristic polynomial of the operator plays the role of the *order* of a finite abelian group, while the minimal polynomial and other invariant factors determine the refined decomposition. (The minimal polynomial plays the role of *exponent* of the finite group.) Less elementary examples occur in number theory and representation theory, etc.