The joke is a pun. Fire fighters put out flames that have overtaken a building. A 'match' can mean both a round in a contest or competition, or it can refer to the small sticks that have flammable material that catches fire when struck against a surface.
A contest held by fire fighters is called a ' match ' .