"Baruch HaShem" is a Jewish phrase, literally meaning "Bless the Name". However, this is just like saying "Thank God!" in English, and is used just as often. The Hebrew word "Baruch" means "bless", and originates from the word "Bracha" (blessing). A Jew will usually use this phrase if something good happens, for example: "Baruch HaShem that he did not get hurt in that car accident."
Jewish tradition forbids God's actual name to be spoken aloud; even in serious prayer, one does not pronouce His name according to the spelling and vowels in the Siddur, or prayerbook. Instead, one says "Adonoi", which translates into "My Master". But since this phrase is designated for actual prayer only, when Jews refer to God in a casual manner, they normally say "HaShem", which, as you accurately stated, means "the Name [of God]". The true name of God is considered too holy to be spoken at all, and when written out in Hebrew, it is forbidden to erase or throw away the paper.