The dominant and subdominant chords help define the tonic chord. The dominant chord is one fifth above the tonic and the subdominant chord is one fifth below:
These two chords create an harmonic tension that resolves into the tonic chord.
Listen in the next example how the subdominant (IV) and dominant (V) chords help define the tonic. Listen also how the subdominant chord leads us to the dominant chord in the third measure. This example is in G Major and it begins with the dominant chord:
Key: G Major
Tonic (I): G major
Dominant (V): D major or D dominant seventh
Subdominant: C major