When is the best time to get a flu shot to protect yourself?

When is the best time to get a flu shot to protect yourself?