Why do I need a flu shot every year, while many other vaccinations last years or even a lifetime?
The flu virus changes rapidly so that the current vaccine doesn't work against the new strains. 

The way vaccines work is that they teach our immune system what to look out for. The vaccine contains bits of the virus but in a form that can't cause a proper infection, the body learns what to look for and next time before the virus can really get going the immune system kills it off first. 

In the case of flu, every year it looks different enough that the targeting mechanisms of our body don't recognise it. Flu being a RNA virus frequently mutates until it is slightly different. This is called antigenic drift, the changing of the antigens or the parts our body recognises. 

On top of that there's lots and lots of types of the influenza virus, that can not only infect humans but others which affect other animals. Occasionally the virus might combine with a random other strain making it completely new: an animal flu and human flu hybrid. These are the epidemics of swine or avian flu etc. This recombination is called antigenic shift.

So each year scientists predict which viruses will affect us this coming year and grow them ready for vaccines. Of course there's some of the old virus floating around looking for someone to infect, but those infected can't be infected by it again if the immune system is working.