A thought shield, also sometimes called a mental shield, was a technique used by Force users, and telepaths, in order to keep their thoughts, emotions, and motives secret from others. It was taught from the earliest age, to Padawans, apprentices, and sometimes even diplomats, in order to keep their thoughts and emotions from being read and interpreted.
In battle, this was crucial as an enemy may sometimes be able to predict an unshielded opponent's next movement and easily counter-attack or evade their attacks. In diplomats, it was taught as an empathic person might detect the true motives of their visit. Apparently, all that was involved in the shield was a strong, mental will, and the ability to concentrate for long periods of time; this being the case, it was not uncommon for non-Force users to learn it as well. Eventually, this concentration would become second nature, and subconscious. By focusing, a being could raise and lower the shield as they saw fit, but usually it was kept raised.
Atton Rand was particularly skilled in this technique, having been trained in the Echani arts to hunt down Jedi during his days as a Sith special forces unit. His main method of this was to "play pazaak," albeit in his mind, as a way to keep it occupied. While he was for the most part effective in this, he was nevertheless unable to block out Kreia's telepathic abilities. During his time with Meetra Surik, he also taught her this ability.