Let's say Scotty wants to talk to the Captain, so he presses a button on the communication panel and speaks: "Scott to Captain". If the Captain is aboard ship, the communication system simply plays his words over the ship's speakers as a page. To answer, the Captain has to find a communication panel; when using the panel, Scott and the Captain are then able to communicate via their panels like we use office speaker phones. If the Captain was away from the ship, the communication system processes his command, finds the Captain's communicator and makes it go "beep beep". The Captain opens his communicator and speaks through it like we use cell phones.
The key points in my "Scott to Captain" example:
"Scott to Captain" is a command to the communication system, just like you might ask Siri for something. The system makes decisions about how to handle the request - how to notify the recipient of the communication request; one option is to play the request as a page, another is to "ring" a communicator.
The communicator is very similar to a present-day cellphone. The other party's voice comes out of a speaker on the device which anyone close by can hear. The communication channel between devices may incorporate security and privacy measures, but device does not make any provision to keep a conversation from being overheard by someone in the user's vicinity.
More or less the same deal as TOS, except that they use pins instead of boxes. The pins have built-in microphones/speakers, so it would be a bit like having a miniature cellphone in permanent speaker mode pinned to your tunic,