The combadge is the Starfleet insignia badge of the 24th century, which doubles as a communicator activated by a tap and serves as a locator for the transporter.
By the time of the Enterprise-D, Starfleet officers no longer carried separate communicators. The delta-shaped insignia on their uniforms contained a communicator, and a light tap opened a channel to the ship or to another crew member.
The badges also allow the ship's computer to track the location of crew members and give the transporter a signal to lock onto, making it routine to beam a person back simply by locating their badge. Removing a combadge, or having it taken, has often been a way of hiding from the ship or separating someone from help.
Designs changed over the decades, and the combadge remained part of the uniform into the late 24th and 25th centuries. Away teams have improvised with it, rigging combadges as beacons or as remote triggers.