Combadges are used for communications from individuals to other persons, starships, planetary locations and anywhere else within the range of the device. They also function as a locator device for transporter beams and have integrated universal translators. (VOY episode: The 37's, et al.)
Starfleet first began using combadges in the early 24th century. The combadge replaced the earlier communicator. Starfleet combadges are worn by officers, enlisted personnel, Starfleet Academy cadets, and other personnel attached to Starfleet. Starfleet combadges are worn on an individual's left breast. (TNG episode: "Yesterday's Enterprise")
By the mid 24th century Klingons had also replaced their communicators with combadges which were worn on their arms. (TNG episode: "The Mind's Eye") The Bajoran Militia also used combadges which functioned similarly to the Starfleet combadge, however it was worn on an individual's right breast.
In 2364 Tasha Yar modified her combadge to output a high pitched whine, sufficiently distracting and pain inducing to allow her and Commander Riker to fight their way past numerous guards on the planet Tigan. (TNG comic: History Lesson)
In an alternate timeline in which Deanna Troi died in 2368, by 2408 Starfleet had replaced the combadge with devices that were implanted in a person's body. These devices allowed for greater security as only the recipient could hear the conversation. If a person wished they could whisper and not be heard by any bystanders, but clearly heard by the recipient at the other end.(TNG novel: Imzadi)