Triplets and Tresillos are both groups of 3 notes, and the timing of these is often confused. Let's look at the difference, and how to use them effectively.
Triplets are a succession of three notes, with their length shortened to fit into the space two notes would normally fill.
As you can see below, a triplet grouping of half notes allows three of them to fit into one bar of 4/4 timing.
Two triplet groups of quarter notes let us fit six quarter notes into one bar of 4/4.
It's important to play all three notes with equal length. This can be difficult at first, as it can feel unnatural laid over top of the click of the metronome. The triplet is a great tool to add some rhythmic colour into your playing, and it will come up when learning songs.
There are other sorts of tuplets beside the triplet, but mastering the triplet is by far the most important.
Here we have a Tresillo. At the moment this is a very common rhythmic arrangement in popular music, and it's also often unintentionally performed when some musicians attempt a triplet.
A dotted quarter note lasts a beat and a half, which leaves us with two and a half beats to fill for the remainder of the bar, so we even it out with another dotted quarter note, and close out the last beat of the bar with a regular quarter note.
A common way of thinking of the Tresillo is as a 3+3+2. This makes sense if you think of our bar of 4/4 as a group of eight 8th notes.
A dotted quarter note lasts the same amount of time as three 8th notes.
A regular quarter note lasts the same amount of time as two 8th notes.
Hence, 3+3+2!
Here, we have a "Double Tresillo".
I don't think it has an official name, but it's also very common.
It might look complex, but it's still just a series of dotted and regular quarter notes.
The exception here is the quarter note tied to the eighth note in the next bar, but it still works out to 1.5 beats, the same length as a dotted quarter note!
So, this two bar pattern can be thought of as a 3+3+3+3+2+2, given that our total pattern works out to being 16 eighth notes long.
We could also fit our Double Tresillo pattern into one bar using all eighth notes, both dotted and regular, as seen here.
We can still think of it as 3+3+3+3+2+2, but this time what we're adding up are 16th notes.
Often, when you hear a beat or strumming pattern with a sense of "groove" or unusual timing, it will break down to a Tresillo, Double Tresillo, or a similar variation on the pattern. Learning to understand and recognize this rhythm will make it much easier to break down other complex rhythms in the future.
Now that you understand both triplets and tresillos, use this knowledge to keep the timing of your triplets tight. It's surprisingly common to hear musicians misplay their triplets, even among relatively experienced players.