In enumerating the different creatures which came onto the ark with Noach, the Torah states that there were certain animals that came on board which were "not clean" (בראשית ז':ח'). The Gemara in Pesachim (דף ג.), taking note of the fact that the Torah here refers to those animals not as "unclean" (טמאה), but as "not clean" (איננה טהרה), points out that the Torah used this longer expression instead of the simpler one in order to avoid using a gross or foul expression. The term "unclean" has negative or unseemly connotations; the Torah wished to avoid use of this word and thus got its message across with a somewhat more complicated, but more proper and appropriate term. The Gemara (שם) thus teaches that we must learn from here that we too should not use vulgar and gross words and expressions in our conversations, and then documents other sources in the Tanach that indicate the same thing. The Gemara in Shabbos (דף ל"ג.) states that terrible tragedies result from the sin of using vulgar language, adding that it is improper to use one's mouth to describe things such as sexual acts because this constitutes foul language (ניבול פה); the Gemara in Chagigah (דף ה:) indicates that one is held responsible and ultimately judged for excessive improper talk (עיין שם ברש"י בד"ה שיחה). The Midrash in Bereishis Rabbah (פרשה ל"ב סימן ה'), among other places, suggests that even when one absolutely must describe something which has improper connotations, one should first describe it using more positive and appropriate expressions.
The Sefer Chareidim, in his list of Mitzvos Lo Sa'aseh which relate to the use of one's mouth (כ"ד אות מ"טפרק ), states that it is prohibited (as an adjunct Mitzvah, though not one of the 613 primary Mitzvos) to use vulgar language, and he documents various terrible things that happen to one who does speak such ניבול פה, including the punishment that such a person's prayers will not be answered. He bases this position on a Posuk later in the Torah (דברים כ"ג:ט"ו) which states that one should not allow in himself the existence of an "ערות דבר," which can mean "a vulgar word." Although that phrase can and indeed often is understood to mean something else, this interpretation of it as referring to what comes out of one's mouth appears to be accepted by the Targum Onkelos (שם) as well as by Ibn Ezra (שם בד"ה ערות). It is interesting that the Yerushalmi in Terumos (פרק א' הלכה ד', דף ו:,ועיין שם בפירוש הרידב"ז בד"ה ר"ז) also understands this Posuk (שם) to be prohibiting an inappropriate manner of speech, although in a different context; the Mordechai in Eiruvin (סימן תקי"ב, דף ל"ח. בדפי הרי"ף) quotes this as well. The Rambam (פרק ה' מהל' דעות הלכה ד'), when discussing the proper intimate conduct between husband and wife, rules that even at the most private of moments one must avoid the use of vulgar language; this ruling is mentioned as well by the Shulchan Aruch (אבן העזר סימן כ"ה סעיף ב').
The Gemara in Bava Kamma (דף ל"ח:) says that Hashem rewards those who speak nicely and use proper language. The Yam Shel Shlomo there (שם פרק ד' סימן י"א) states that we may derive from this that one must be extremely careful with his manner of speech, even more so than he is with his deeds, and he adds that even that which may permissibly be expressed must be expressed in language which is as clean as possible; one must therefore measure each of his words carefully. He thus rules that even words which may not necessarily be considered improper, but which can have vulgar connotations, ought to be avoided, as in the case of the aforementioned Gemara in Pesachim (שם) describing the Posuk in this Parsha (שם); he then implies that this is the reason why some people refer to the Maseches called "Beitzah" as "Beiah," because the former word can have inappropriate connotations. This ruling is cited as well by the Magen Avraham (אורח חיים סימן קנ"ו סעיף ב'), although the Taz elsewhere (יורה דעה סימן קכ"ד סעיף א') seems to be more lenient when one's intention with the use of a word or an expression is not to be vulgar or lewd. It is worth noting that the Magen Avraham (שם), as well as the Mishnah Berurah (או"ח שם ס"ק ד'), who also documents this prohibition to use foul language, both cite a Gemara in Yoma (דף י"ט:) that prohibits certain manners of speech which they understand to include profanity and improper light-headedness, based on the requirement to speak only words of Torah (עיין שם ברש"י בד"ה בם) presented in the first paragraph of Kerias Shema (דברים ו':ז').
It is obvious that it is forbidden to use the name of Hashem as part of an expletive, or a curse, or a statement of profanity, as implied by the Gemara in Temurah (דף ג:-ד.), based on a later Posuk in the Torah (שם פסוק י"ג). The Gemara in Nedarim (דף ז:) states that one who uses Hashem's name for no purpose, as explained by Rashi (שם בד"ה הזכרת), and certainly, therefore, in a disrespectful manner, should be excommunicated; the Rambam (פרק י"ב מהל' שבועות הלכה ט') and the Shulchan Aruch (יו"ד סימן של"ד סעיף ל"ז) rule accordingly, although Rabbi Akiva Eiger (חידושי רע"ק שם בד"ה חייב) quotes from the Ramo (שו"ת הרמ"א סימן קל"ב אות ד') and from the Semag (מצות לא תעשה רמ"א) that the practice is not to actually excommunicate such a person today, despite the fact that what he did is inappropriate. It must be stressed that this prohibition to use the name of Hashem in a disrespectful fashion or as part of a vulgar statement applies to the use of His name in any language, as stated clearly by the Chayei Adam (כלל ה' סעיף א'), who cites, among other sources, a ruling in the Shulchan Aruch (חושן משפט סימן כ"ז סעיף א') which implies that this is indeed the case. This also seems to be the position of the Rambam (פרק כ"ו מהל' סנהדרין הלכה ג'), and it may be based on a Gemara in Sanhedrin (דף ס.), as suggested by the Vilna Gaon (ביאור הגר"א שם ס"ק ב').
The Nesivos HaMishpat (משפט הכהנים שם ס"ק ב') laments the fact that people are very careless with the use of the name of Hashem in other languages, and use it as part of a curse or in other improper fashions, which he believes constitutes a violation of a prohibition from the Torah; he urges Talmidei Chachomim and Torah leaders to train people to be more careful about this. The Chayei Adam (שם) also rules that misusing Hashem's name is a violation of a prohibition from the Torah, and he adds that one should tremble when mentioning Hashem's name; he then cites a powerful story of an individual who was otherwise a Tzaddik but was condemned in Heaven because he was careless with the use of Hashem's name. The Kitzur Shulchan Aruch (סימן ו' סעיף ג') also enumerates this prohibition to misuse the name of Hashem in any language, as does the Mishnah Berurah (או"ח סימן רט"ו ס"ק י"ט). It should be pointed out that words which imply a curse against another person, even if indirectly, as noted by the Mishnah in Shevuos (דף ל"ה.) and codified by the Shulchan Aruch (חו"מ שם סעיף ב') must be avoided; this applies as well to phrases with which one curses oneself, as also stated by the Mishnah (שם) and codified by the Rambam (שם) and by the Ramo (שם סעיף א').
It is clear from the Targum Onkelos (לבראשית ב':ז') that the power of speech is one of the things which identifies man and separates him from the rest of Creation. The Rambam, in his Moreh Nevuchim (חלק ג' פרק ח'), states that this power is a gift from Hashem which distinguishes man from other creatures, and it is thus inappropriate to use this gift in a degrading or vulgar fashion. The Menoras HaMaor (נר ב' כלל ד' חלק ג' פרק ב') notes that people are often ready to undergo great torture in order to avoid incriminating themselves, yet are not careful about avoiding vulgar language which brings with it terrible punishments and a contamination of the Neshomah. One should thus be most careful to use only pure language.