These viruses all have eight genes, and each gene can have variants. You can think of the genes as suitcases carried on a trip from person to person and species to species: each has something in it the virus needs. But the "wet weather clothes" suitcase need only have sufficient wet-weather clothes...the virus can drop a pair of black rain boots off in a hog farm and pick up a pair of green ones for that suitcase (so to speak.) Viruses in general (and flu viruses in particular) are constantly changing because of this ability to swap out the contents of each suitcase (or gene). Some swaps make the virus more capable of infecting a given species' cells--genes encoding surface proteins of the virus, for instance, that allow it to bind to and release virus into cells. Some make it more capable of multiplying in those cells by co-opting the cells' own biochemical mechanisms, etc.
Those surface proteins classify the viruses by H (hemagglutin, 16 possible proteins) and N (neuraminidase, 9 possible proteins), but although there are 144 possible combinations, only three (H1N1, H2N2, and H2N3) have been found in human flu strains (with human-to-human transmission, that is.)
The current H1N1 pandemic virus is a direct descendant of the 1918 pandemic virus in a fascinating roundabout way. The 1918 human H1N1 moved across species to swine in North America, providing an H1N1 swine flu. The progenitor gene pool for the 1918 human H1N1 (believed to be avian) moved across species to swine also, providing Eurasian swine H1N1, whose genes were slightly different from North American H1N1 swine flu. H1N1 could also cross-assort with H1N2 and H2N3. So right now we're dealing with seasonal H1N1 strains, and a pandemic H1N1 strain, plus seasonal H3N2. The seasonal H1N1 has genes all derived from the 1918 human flu (they've mellowed over the years but still kill thousands a year. The pandemic one has genes from avian, North American swine, and Eurasian swine H1N1 genes.
I was fascinated to learn that the severe flu pandemics of 1957 and 1968 were also direct descendants of the 1918 pandemic, but H2N2 and H3N2 respectively. I had my first flu shot for the 1957 one (I was twelve and had no choice) and either reacted to the shot or got sick with the flu anyway (it felt like flu)...so after that was reluctant to have the shot. In 1968, having refused to take the shot, I got the flu, and the pneumonia that followed (I will say that if you do your gas-mask training in the military with your lungs full of crud, the tear gas side effects don't last as long.) After that, I had seasonal flu a few times with much less trouble (milder strains, obviously) but when working in EMS agreed that as part of emergency services I should be available and started taking flu shots again. No reaction, no problems. When I got flu anyway it was usually mild and mostly I didn't.
Anyway, there's a lot more technical stuff known about the flu virus genes, what they do, why bird flu and swine flu are cross-infective with humans, and so on. All of it interesting, even if it weren't a disease that can infect and kill us. There's a lot more that's still not known. Why can't an H13N4 be a viable human strain, for instance? (I'm glad it's not, but still...)