The opening act's performance serves to "warm up" the audience, making it appropriately excited and enthusiastic for the headliner.
In rock music, the opening act will usually be an up-and-coming group with a smaller following than the headliner.
[3] They usually work alone and perform a comedy routine while also possibly explaining aspects of the show.
[1] Some warm-up routines before talk shows involve giving prizes to audience members.
[3] The use of warm-ups in comedy dates back before television to radio shows.