WikipeidaWikipedia explains how to come up with the parametrization (I think I've seen the term "generating functions" for this, but really that term means something entirely different).
Update: Ha! apparently you can also use Hilbert's theorem 90 to obtain the parametrization (Elkies' note).