Correct execution of string damping technique is a very important requirement for achieving a polished performance.
The main reason for damping a note, apart from the obvious one of artistic articulation, is to prevent a sustained open string from clouding the harmony when there is a harmonic change in the composition.
The right hand thumb is the most common way to stop unwanted overtones, in fact your thumb should act similar to a damper pedal on a piano. An example of undesirable overtones is when an low open A bass note continues to sustain after a passage changes to a dominant E harmony.
The dominant E chord the open A string will combine to produce an unpleasant discord. In this case the open A string should be damped slightly before the change in harmony. This is achieved by placing your right thumb momentarily back on the vibrating A string just before playing the next chord.
Another technique, particularly at the end of a phrase, is to lay the fleshy side of the right hand near the little finger across the strings adjacent to the bridge. This will give a clean break in sound on all strings.
Finally, the left hand fingers are also useful for damping unwanted notes, in particular the little finger which can be used to quickly touch the offending notes. As you probably have noted, the offending notes are usually open bass strings which have longer sustaining characteristics than the treble strings.
As with all aspects of guitar performance it is important to listen very critically to the sound that you are producing. Concentrate on eliminating all unwanted dissonances from your performance. Sometimes it requires great ingenuity to solve a problem dissonance, but the end result will be worth every effort.