It has been correctly stated here that "canon" has screwed up subspace communications. More correctly, anything Trek produced after Gene Roddenberry died (i.e. Berman/Bragga) screwed up most everything Trek as far as "canon" is concerned the way GR meant for it to be. But regardless...
In the pre-TMP days (that is, mid- to late-70s), there was a fanzine called "Trek" in which a writer named Mark Andrew Golding came up with extremely plausible explanations of Treknology based on watching the episodes with an eye for extreme detail. One of the things he explained was subspace communications.
He had explained warp drive and pre-warp FTL travel in previous articles, and subspace communication built upon that. Without going into all of that detail, suffice it to say that there are a number of permanent naturally-occurring warps between certain star systems. Ships do not really travel FTL, but really travel at a small fraction of lightspeed and either take advantage of the natural warps or use warp drive to generate an artificial warp.
A subspace signal cannot generate its own warp, obviously. However, it does have the advantage of traveling at the speed of light. By placing communications relays at the ends of the naturally-occurring warps, the subspace signal can be directed through the warp and travel at an effective speed of about warp 60 (according to "The Making of Star Trek" which gives the speed but not the explanation).
There is an extensive network of subspace relays throughout explored space. If a ship is near one of the relays, communication with a ship, station, or something else near another relay can seem almost instantaneous. But if you're some distance from the nearest relay, the signal travels at "only" the speed of light until it reaches the relay, then travels at full subspace speed through the network.
For example, in "The Trouble with Tribbles" Kirk has a real-time communication with Admiral Fitzpatrick even though they're near the Klingon border, presumably because there is a relay either near Station K7 or actually part of the station. OTOH, in "The Enterprise Incident", Subcommander Tal says a message to Starfleet would take 3 weeks from their present location (some point actually in Romulan space past the Neutral Zone, where Starfleet would not have had the chance to place relays).
In "Star Trek IV", in the very brief scene on the Enterprise-A at the end of the movie, take a look at one of the overhead displays at Uhura's station. It is a portion of a map of the subspace relay network. A better view of this map is printed in "Mr. Scott's Guide to the Enterprise" and can probably also be found on-line somewhere.
So even though Mark Andrew Golding's explanation was written based solely on TOS episodes, it appears to remain valid with the later movies and TV series.