Such systems use a force field to contain any flames that are detected by the resident computer. This containment allows the fire to consume all oxygen within it, which starves the fire and causes it to go out.
On stardate 42823.2, when the Bringloidi tried to make an alcoholic substance in the cargo bay, the automated fire system responded due to a localized increase in carbon dioxide emissions from a camp fire which had been started in the bay. Such technology was unknown to the Bringloidi. (TNG: "Up The Long Ladder")
In 2368, the fire suppression systems failed to activate after the USS Enterprise-D sustained damage when it passed through a soliton wave, causing fires in a biolab. This endangered Alexander Rozhenko, but he was rescued by both his father, Worf, and Commander Riker. (TNG: "New Ground")
In 2369, the fire control system on board Jaheel's ship failed to function after his aft isolation plate buckled during an attempt to leave Deep Space 9 while the mooring clamps were still engaged. (DS9: "Babel")
Several months later, when a software lifeform known as "Pup" threatened the station, a plasma surge occurred in the habitat ring, in which none of the fire-suppression systems activated. (DS9: "The Forsaken")
In 2374, when Miles O'Brien was on an assignment with Starfleet Intelligence to infiltrate the Orion Syndicate, the fire-suppression system in Quark's malfunctioned. Each time Quark made a flaming cocktail, the system would activate and put it out. (DS9: "Honor Among Thieves")
In 2375, when Odo entered his quarters and found a flame flickering in midair, he told the computer to activate the fire-suppression system before he realized that the flame was actually Laas. (DS9: "Chimera")