You're injected with an inactivated form of the virus. Just like you didn't get tetanus when you got your tetanus shot, measles when you got your mmr shot, or hepatitis when you got your round of hepatitis vaccines.
The easiest way to describe it: getting the flu from the flu shot is like getting bit by a dead dog.
However, the vaccine only protects against the most common strains of the flu, so there's still a chance you could get a less common strain. However, you're not going to get the flu as a consequence of the shot.