Somebody has to set up the joke so the funny guy can deliver the punchline. That's the Straight Man. He rarely gets the funny lines, but has to have impeccable timing and delivery so that the comic (the other half of a comedy duo) can hit it out of the park. Bud Abbott (widely considered the greatest Straight Man of all time) had to say, "Who's on First," with just the right degree of earnestness and irritation so that Lou Costello could get big laughs saying "Whaddya askin' me for?"
The best Straight Men are so good they can sometimes get laughs just by delivering a straight line so well the audience knows what's coming. (This is essentially the basis of Bob Newhart's "telephone" routines: he was playing the Straight Man to nothing.) Other straight men in comedy duos have included George Burns (with Gracie Allen), Dean Martin (with Jerry Lewis), and Dan Rowan (with Dick Martin of Laugh-In).
In less-comedic works, the Straight Man is a Foil for the Bunny-Ears Lawyer, Magnificent Bastard, Large Ham or Loveable Rogue.
If the Straight Man is the lead in an ensemble or a show with a large cast, this can lead to them being overshadowed by the rest of the cast because they spend their time and effort setting up the rest of the cast instead of themselves (see also Standardized Leader).
Note: A person does not need to be straight or a man to be this trope. The term can apply to women, but "comedic foil" is a more popular unisex term. In fact, women in comic pairings have frequently played this role over the last few decades, usually with Women Are Wiser coming into play.
In TV comedy, a Straight Man is frequently one half of an Odd Couple. In a Comic Trio, they usually play the "helpless observer" role. If multiple characters take turns playing Straight Man, they have a game of Sanity Ball. By far the most common pairing is Straight Man and Wise Guy.