From Wikipedia:
An underdog is a person or group in a competition, usually in sports and creative works, who is popularly expected to lose. The party, team, or individual expected to win is called the favorite or top dog. In the case where an underdog wins, the outcome is an upset. An "underdog bet" is a bet on the underdog or outsider for which the odds are generally higher.
The first recorded uses of the term occurred in the second half of the 19th century; its first meaning was "the beaten dog in a fight". In British and American culture, underdogs are highly regarded. This harkens to core Judeo-Christian stories, such as that of David and Goliath, and also ancient British legends such as Robin Hood and King Arthur, and reflects the ideal behind the American dream, where someone who is poor and/or weak can use hard work to achieve victory. Underdogs are most valorized in sporting culture, both in real events, such as the Miracle on Ice, and in popular culture depictions of sports, where the trope is omnipresent. The idea is so common that even when teams are evenly matched, spectators and commentators are drawn to establishing one side as the underdog. Historian David M. Potter explained that underdogs are appealing to Americans not because they simply beat the odds, but overcome an injustice that explains those odds - such as the game being unfairly rigged due to privilege and power.In a story, the Fool is often an underdog if they are the main character. Their apparent ineptitude leads to people underestimating their true abilities, and they are able to win either through luck or hidden wisdom against a more powerful, "establishment" villain. An example in film is The Tramp portrayed by Charlie Chaplin.