(covers information from several alternate timelines)
The combadge was a small, multi-purpose communications and universal translation device, which usually took the form of an organization's insignia designed to be worn by the user. By the 24th century, combadges and similar devices were in use by multiple species and organizations, including the Bajoran Militia, and Klingon Empire. (Star Trek: The Next Generation, Star Trek: Deep Space Nine, Star Trek: Voyager, Star Trek: Picard)
In the 22nd and 23rd centuries, communicators were small, if not bulky devices which needed to be carried or holstered by people using them. Members of Starfleet, usually had access to these while away from their ship, or were not able to reach a wall mounted intercom. (Star Trek: Enterprise, Star Trek: The Original Series, Star Trek: The Motion Picture, Star Trek II: The Wrath of Khan, Star Trek III: The Search for Spock, Star Trek IV: The Voyage Home, Star Trek V: The Final Frontier) However, unbeknownst to a lot of the Federation, Section 31 had developed and deployed small communicators in the form of the Starfleet delta to its members as early as 2256. (DIS: "Saints of Imperfection")
Large scale roll out of small, wearable badges didn't occur to the later 24th century, where they became standard issue among Starfleet crews as early as the 2340s. (TNG: "Yesterday's Enterprise") A combadge was considered standard equipment for all Starfleet personnel, and taking off one's combadge constituted taking off one's uniform. (TNG: "Redemption", "Journey's End"; DS9: "Tacking Into the Wind", "Inter Arma Enim Silent Leges")
As a symbol of loss of membership in Starfleet, personnel that had resigned or had been relieved of duty were required to turn in their combadges. Additionally, personnel confined to a brig were not permitted to retain their combadges during their confinement. (TNG: "Redemption", "Journey's End"; DS9: "Paradise Lost", "Inquisition"; VOY: "Thirty Days")
During this time, Starfleet produced and deployed several iterations of their badge which took on different designs. This trend continued to the all the way to the 29th century. (Star Trek: The Next Generation, Star Trek: Deep Space Nine, Star Trek: Voyager, Star Trek: Picard, Star Trek: Lower Decks) By 2399, Cristóbal Rios, the captain of the civilian freighter La Sirena, had access to smaller combadges, called comm pins, in the shape of his ship's personalized mermaid emblem. When necessary, Rios provided them to his passengers. (PIC: "Absolute Candor", "The Impossible Box", "Nepenthe", "Et in Arcadia Ego, Part 2")
Different styles of combadges often co-existed in the same era. Similar to Starfleet uniforms, the combadge used by personnel may vary by the ship, the officer's rank or department, or the facility they were stationed on; these were retained even when visiting other Federation locations. (TNG: "The Child "; LD: "We'll Always Have Tom Paris", "Kayshon, His Eyes Open"; DIS: "Saints of Imperfection")
Badge styles and insignias have been known to change rapidly year to year, and older combadges were sometimes retained for continued use or for sentimental purposes. (DS9: "The Search, Part I"; PIC: "Remembrance"; Star Trek: The Motion Picture; Star Trek II: The Wrath of Khan)
During the Dominion War and its aftermath, uniform and combadge variety was pared down considerably, but the use of different combadge styles and co-existing variants expanded again in the relative peace that followed in the 2380s. This trend continued until the disaster at Utopia Planitia in 2385, when Federation resources were once again strained. (DS9: "What You Leave Behind"; Star Trek Nemesis; LD: "No Small Parts"; PRO: "Lost and Found"; PIC: "The End is the Beginning")
At some point prior to the 31st century, combadges were replaced with tricom badges. (Star Trek: Discovery) However, a handful of 2370s and 2380s style Starfleet combadges managed to survive all the way to the 31st century, where many of them ended up in the hands of the Emerald Chain. (DIS: "Scavengers", "The Sanctuary")
The Starfleet combadge was a crystalline composite of gold, microfilament, silicon, beryllium, and carbon-70. (TNG: "The Last Outpost", "Time's Arrow"; VOY: "Hope and Fear") They were designed for on-board ship communication with other Starfleet personnel when using the internal communication system was impossible or impractical, for accessing the on-board computer when not in an area that the computer is monitoring, for ship-to-shore communications, and for direct communication to another combadge. Combadges also were configured to act as universal translators, often translating in real time. (DS9: "For the Uniform"; VOY: "The Cloud", "The 37's", "Investigations") Bajoran badges were also capable of recording a user's personal logs. (DS9: "The Ascent")
As early as the 2360s, combadges were used as a means of providing personal identification to shipboard computers. Each time a user accessed a specific console, the computer logged the individual's identification to that access. (TNG: "The Drumhead"). By the 2370s, personnel had their name and serial number engraved on the back of the badge. (PIC: "Maps and Legends")
Combadges were activated by pressing it once and calling out the name or general area of the intended recipient. They could then be deactivated by another single press. Multiple presses on the badge could be used as an attempt to gain the attention of a ship's crew. (VOY: "Caretaker")
Combadges were often incorporated with numerous security features intended to protect its user and Starfleet systems. They can be set to only be activated by the user it was assigned to, identified by biometric fingerprint data. (TNG: "The Hunted")
In emergency situations, a combadge could be modified for use in other applications. It could be converted into a subspace distress beacon, or the tiny power cell could be extracted for other uses. (DS9: "Rocks and Shoals") If the casing of the combadge was ever cracked, an emergency distress signal was emitted, mainly to help searchers locate victims. (TNG: "A Fistful of Datas"; VOY: "Time and Again")
Furthermore, a combadge's energy cell can be used to power a makeshift personal force field generator for several seconds. (TNG: "A Fistful of Datas") A downside to this is when destroyed by an electrical force, a badge could cause damage to the wearer's clothing. (TNG: "Thine Own Self")
Although designed primarily as communicators and universal translators, many of these devices served other roles for their users.
Combadges could be used by the transporter as a way to lock on to Starfleet personnel; more generally, the transporter could lock onto any person or object with a combadge attached or nearby, thus making transport faster and more accurate. USS Enterprise-D Chief Engineer Geordi La Forge used his combadge to allow the transporter to beam off an explosive device that the Ansata terrorists planted on the ship during their mission on Rutia IV. (VOY: "Caretaker", "Tattoo", "Investigations", "The Chute"; TNG: "Justice", "The High Ground") When Ferengi briefly took over the Enterprise in 2369, they were captured by attaching combadges to them and using the badges to beam them into a secured transporter room. (TNG: "Rascals")
The Starfleet insignia pin first used in Star Trek II: The Wrath of Khan later became a combadge, as Lieutenant Richard Castillo can be seen pressing his and speaking into it in TNG: "Yesterday's Enterprise". The combadge with the rectangular back was designed for Star Trek Generations and first seen in the Star Trek: Deep Space Nine third season premiere episode "The Search, Part I", before being used continually in the series and Star Trek: Voyager. It also appeared in the four Next Generation movies and in episodes of Star Trek: Picard and Star Trek: Lower Decks.
When the combadge first appeared in Star Trek: The Next Generation, it appeared to be larger than the prop used in later seasons. It was also referred to as a communicator rather than a combadge by Beverly Crusher in TNG: "The Naked Now" and "Remember Me".
There have been two possible future combadges seen in Star Trek.
The future combadge most commonly seen throughout the Star Trek franchise was a delta shield outline backed by two vertical gold quadrangles, depicted in several possible futures as early as 2390. This combadge has been seen in TNG: "All Good Things...", DS9: "The Visitor", VOY: "Timeless", and VOY: "Endgame". This advanced combadge finally appeared in the prime timeline in 2378 during the finale of Star Trek: Voyager, when it was brought back in time by a future version of Kathryn Janeway from the year 2404. That future combadge was left behind in 2378 alongside other anachronistic future technology that aided in Voyager's early return to Earth fourteen years early. (VOY: "Endgame") Years later, a similar looking combadge with streamlined upgrades and silver coloring appeared in Star Trek: Picard, as Starfleet's standard issue combadge during the 2390s.
Also seen in Voyager was a 29th century combadge. This is a "winged" arrowhead, similar in style to the insignia found on a 24th century starship hull. It has been seen in the episodes VOY: "Future's End", "Future's End, Part II", and "Relativity", used by Starfleet officers aboard the timeship the USS Relativity.
In TNG: "Future Imperfect", a different future combadge was shown in a holodeck simulation, but it was later revealed to be a part of a fake portrayal of the future used to decieve William Riker. It was comprised of the delta shield and three rectangular strips behind it signifying rank, doing away with rank pips. In TNG: "Parallels" the same combadge was seen again alongside rank pips in an alternate quantum reality, but not from the future. The backing strips were colored either gold, silver, or black depending on the rank of the wearer; admiralty had a starred gold delta with silver backing strips.