How does the flu vaccine work to prevent illness during flu season?

How does the flu vaccine work to prevent illness during flu season?