When using chords to harmonize melodies, certain chords are more common than others. The most commonly used chords in any key are the tonic ( I ), subdominant ( IV ) and dominant ( V ). These are called the primary triads. With these three chords, it is possible to harmonize any melody in a key, because between them they contain all the notes in the scale, as shown here.
This example demonstrates the primary triads in the key of C major in voicings that are easy to play on the keyboard. Remember that as long as you play the correct notes, chords can be played in any inversion.