A 12th man in soccer is a phrase that refers to a fan or supporter as part of the team. This is for eleven-a-side sports, and since there are 11 players on a soccer field per team, this concept applies.
The 12th man is referred to as any person who is very helpful in winning a game. In this case, soccer fans are the 12th man because they are extremely important to any team.
Since fans have a large impact on the game as a whole, they are regarded as very important figures in sports games. They not only provide energy and cheers, but players are no longer playing for themselves, but also for their team's fans.
Some leagues have even retired number 12 on shirts, or sell special merchandise with the number 12 on it just for fans. Soccer fans are idolized for their spirit, support and energy throughout games. In fact, the game wouldn't be the same without them.