HaShem (in Hebrew: השם) is a term that literally means “The Name”. It is used to avoid referring to the Name of GOD. It is also used to avoid writing the word YHWH (formed by the Hebrew letters yod hei vav hei), and with the word ADONAI which is used only in prayers, songs and when teaching a class of Torah.
It is common practice for Jewish culture to limit the use of Names referring to the CREATOR to a liturgical context. In a casual conversation some Jews, even when not speaking Hebrew, will call GOD HaShem (השם), which means “the Name” (cf. Leviticus 24, 11 and Deuteronomy 28, 58). In the same way, citing TaNaKh or prayers, some believers replace ADONAI with HaShem.
It is simply called so, therefore, to preserve the third commandment given by GOD to Moses, which warns against pronouncing the Holy Name in vain. That third commandment can be read in the Bible:
You will not take in vain the name of HaShem, your GOD, because GOD will not find it guilty of those who take in vain His Name
(Deuteronomy 5, 11)
This same commandment can also be observed in the text Exodus 20, 7.
Moreover, H’ (which indicates HaShém) is the way in which rabbinical Judaism affirms that the only Name that really identifies GOD is the one that does not even mention it, because it considers that nothing existing understands the reality of GOD. In many Hebrew texts translated into other languages the word “GOD” is not found in its entirety. For example in Spanish for the word “DIOS” they replace the “I” or the “O” with an oblique bar, or slash (“D\OS” or “DI\S”) so that the reader does not even think of the word “GOD” in vain, and in english (but also in other language like Italian with “D-O”) it is used to put a hyphen in the center of the word GOD (“G-D”) eliminating the letter “O”.
Other interpretations attribute to HaShem the meaning of “I am”, which is what the divinity would have answered to Moses when he asked his name in front of the burning bush on Mount Horeb.
The Talmud (Sanhedrin 90a) teaches the following: “He who pronounces the Divine Name has no part in the world to come.”
A popular expression that contains this phrase is Baruch HaShem, which means “Thank God” (literally, “Blessed be the Name”).