The definition of a "triplet" is: Three of the same type of note played in the time normally used by two notes of that of type. For example, two eighth notes usually occupy one full beat--in an eighth note triplet, three eighth notes take a full beat. This means, of course, that triplets allow us to crowd more notes into a measure than seems "legal." Consider the following:
That example of the Addams Family theme brings up an important aspect of triplets: the most important note is the 4th note! In Celtic music, you may see long strings of triplets, but in most American music, the triplet itself is often used to "set up" the next note, which typically is on beat one.
So, how do we play triplets? One common way is to do a double hammer-on:
Or a double pull-off:
Another type of triplet can be used to play the so-called "Galax Lick." While this can be played as a pair of eighth notes leading to a 5th string played on the beat (and usually twice, at that), it can also be played as a triplet:
In each case, the notes are sounded by stiffening the playing finger of your right hand, pushing down across the two or three strings you are sounding while running your thumb into the 5th string for that all-important, first beat note.