The emergency signal is a communicator function that indicates the holder is in distress and requires immediate help.
In 1969, the USS Enterprise received an emergency signal during Kirk and Sulu's mission to retrieve evidence. Believing the landing party was in jeopardy, Spock ordered an immediate beam-up, and brought aboard an Air Police Sergeant who had confiscated Kirk's communicator and inadvertently activated its emergency signal. (TOS: "Tomorrow is Yesterday")
In 2365, the USS Enterprise-D received a Class 11 emergency signal containing orders to deverte to coordinates 423 by 112 by 51, further orders forthcoming. This was so the Enterprise could rendezvous with Federation Emissary K'Ehleyr who had been dispatched from Starbase 153 in a class-8 probe. (TNG: "The Emissary")