The injected flu vaccine stimulates your body's immune system to make antibodies to attack the flu virus.
Antibodies are proteins that recognise and fight off germs, such as viruses, that have invaded your blood.
If you're exposed to the flu virus after you've had the flu vaccine, your immune system will recognise the virus and immediately produce antibodies to fight it.
It may take 10 to 14 days for your immunity to build up fully after you have had the flu shot.
You need to have a flu jab every year, as the antibodies that protect you from flu decline over time, and flu strains can also change from year to year.
Go to this NHS website for more information about the vaccine and who should have it.