The Influenza Vaccine is made like any other vaccine: it contains the virus it intends to protect you from. The virus is dead or very weak so that your body can identify it, fight against it with minimal side effects, and be ready in case you ever contract the actual flu. You can't catch a disease you've already had, so by injecting a vaccine and having your body identify it, you are protected against contracting the flu.
This is the actual process for making the Flu Vaccine:
Flu Viruses type A and B are grown starting in late summer in the whites (albumen) of chicken eggs. This process takes about two months. The viruses are then extracted, purified, killed, and dispensed into vials.
Thimerosal (a mercury-based preservative) is used to preserve the vaccine on shelves so it can get to the people who need it.