There are two parts to the verse: first, that their names not be mentioned (ושם אלהים אחרים לא תזכירו); second, that they not be heard from the mouth (לא ישמע על-פיך). On second thought - are they two separate parts, or elaborations with differing emphasis of one central prohibition? This seems to be the central issue of the commentaries.
To summarize before getting into particulars: The Talmud grounds the whole verse in the prohibition of collaborating with idol worshipers. One does not swear by an idol (more precisely, a subject of avoyde-zore) because in that context one might come to work together with those who worship it. This short discussion is prefaced by another prohibition: one must not say to one's fellow, "I will meet you by the [name of idol]."
What the Talmud doesn't entirely clarify is the difference between לא ישמע and לא תזכירו. The Gemara connects the later phrase ("don't mention") to its disapproval of using an idol's name to identify a meeting place, while the former phrase ("don't let be heard") is glossed in the following way: "that one not make an oath in their name or carry out a promise in their name, nor cause others to do so."
The Talmud makes two other stabs at the meaning of לא ישמע על פיך. It could serve as a warning not to lead other Jews to sin in making oaths by idols; or it could be an injunction against collaborating in business with worshippers of avoyde zore. The latter opinion (of אבוה דשמואל), standing unchallenged, seems to be the final interpretation.
However, this approach does not square with that of the later commentators. For example, the Ramban says explicitly that any kind of mention at all, whether or not it has anything to do with idol worship (or collaboration with idol worship) is forbidden. (How Ramban understands the strength of this prohibition is unclear.) The Rambam, in his Laws of Idol Worship, cites the passage from the Talmud (nearly) verbatim. He holds that making an actual oath in the name of an idol is forbidden and subject to punishment by a rabbinical court, while a mere utterance of the kind mentioned by the Talmud is prohibited, but without explicit punishment.
The Sefer Chinuch, a compendium of commandments and their justifications, indicates that לא ישמע על פיך is a הרחקה i.e. an ancillary edict meant to strengthen a central prohibition.
The most sensible commentary, both true to the structure of the verse itself (לא תזכירו and לא ישמע על פיך are not different injunctions, but parallelisms) and the understanding of the Talmud (that the central prohibition has to do with swearing by avoyde-zore and collaborating with its practitioners) is that of the Shadal:
והוסיף לא ישמע על פיך, והוא כמשמעו לא יהיה שם האלילים נשמע על פיך, כלומר אפילו לפרקים ודרך עראי, אך לעולם הדבר למד מענינו שאין איסור אלא להזכיר דרך כבוד לתהילה ולתפארת או דרך תפילה ותחינה, ולא שתהיה הזכרת שם האלילים אסורה בהחלט, כי הנה משה אמר ( דברים ד' ג' ) : כי כל האיש אשר הלך אחרי בעל פעור וכו'.The above assumes that Jesus, for example, is a subject of avoyde-zore. I don't think this to be true.
"And [the verse] adds "it shall not be heard from your mouth," and this means that the names of other gods should not be heard from your mouth, that is to say even intermittently and casually. But of course the basic point here is that the prohibition is only that of mentioning [them] with honor and glory or in prayerful fashion, not that the mention of the names of other gods should be completely forbidden, since even Moses said 'every man who followed Baal Peor.'"