In Major League Baseball (MLB), the wild card teams are the two teams in each of the two leagues (American and National) that have qualified for the postseason despite failing to win their division. Both teams in each league possess the two best winning percentages in their respective league after the three division winners. The wild card was first instituted in MLB in 1994, with one wild card team per league advancing to the Division Series in the postseason to face a division winner. In 2012, the system was modified to add a second wild card team per league and pit each league's wild card teams against each other in a play-in game--the MLB Wild Card Game--the winner of which would then advance to the Division Series and play the team with the best record. This system ensures that the two teams with the best records in each league, after the three division winners, will also get postseason berths.
From 1969 through 1993, division leaders in each league advanced to the League Championship Series, with the winners of each LCS meeting in the World Series. However, an expanding number of teams over the years made making the playoffs increasingly difficult. The new system was instituted in 1994 (but first used in 1995 because a players strike canceled the 1994 playoffs) when Major League Baseball expanded from two to three divisions per league. In the new three-division leagues, each league had four teams in the playoffs. In addition to the three division winners, a wild card team made the playoffs as the fourth seed. This was the team with the most wins amongst non-division winners. The wild card matchup was played in the first round between the League leader in wins and the wild card team, unless both teams were in the same division, which resulted in the wild card facing the second-best division winner in the league.
A "wild card" rule was used in the 1981 season after a players' strike wiped out the "middle third" of the season. The owners decided that the winners (in each division) of either "half" of the abbreviated season would make playoffs, with the caveat that if the same team won both halves then the team from the division with the second-best record from the second half would enter the playoffs as a wild card. However, the wild card rule was not actually used since all four divisions had different first half and second-half winners. As a result of the hastily contrived format, the Cincinnati Reds finished the regular season with the best record in all of baseball (66-42 .611) but failed to qualify for the playoffs because they finished 0.5 game behind the Dodgers in the first half and 1.5 games behind the Astros in the second half. The Astros finished 8 games back in the first half and the Dodgers 6 back in the second.
On November 17, 2011, MLB announced that it would be adding two wild card teams to the postseason. The two wild card teams in each league face each other in a one-game playoff. The winner of this game advances to meet the top seed in the Division Series. The revised playoff system began with the 2012 season.
For the 2020 postseason only, the field expanded to include three second-place teams per division, followed by the wild card teams represented by the next two best records from each league. All eight teams would play in a three-game Wild Card Series. 
For each league's list of wild card winners by year and teams with most wild card titles, see: