A button (sometimes "tag") is the final, cumulative line of a sketch or improv scene. It arrives only a moment before the scene is edited, or - if it is the final scene of the show - before the blackout.
Short form improvisers study the button as a part of the greater "String of Pearls" concept. String of Pearls is a story structure, and suggests that each scene should follow a similar pattern: Who, What, Where, Conflict, Resolution, Tag. In this framing, locating a satisfying final line for your scene is just as important as establishing characters, setting, and action. In shortform, buttons often provide a "what have we learned"-style final moment, tying the narrative together and signifying a resolution of the conflict.
Longform improvisers employ a wider variety of buttons depending on the style of their show. Regardless, a button is almost always supposed to be line that draws a big laugh. When performing Game-centric improv, a button is often seen as the most-heightened choice an ensemble could possibly make based on the premise they're working from. The unusual thing being explored is here pushed so far into absurdity that the scene must end. A more theatrical, TJ and Dave-inspired button will look for closure, seeking to tie the scene together in some kind of holistic way, and may not necessarily arrive on a large laugh line.
Note: Someone with more expertise should write about this. I'm kinda making this up from what I've seen.
A sketch button is similar to a Game-centric improv button. Sketches will sometimes employ "reversal" buttons. These final lines spin the premise on its head, and may reveal a perception switch, introduce a new element of absurdity that complements the pre-existing one, or, in the tradition of absurdism the theatrical genre, employ a circular narrative technique and somehow return the scene to where it began. Someone with more expertise on this should write about this.