To harmonize a melody, you simply play a chord which contains a note from that melody on the first beat of each bar. In time, you could also add another chord on the third beat of the bar. There is always more than one possible chord, but some sound better than others. The more songs you learn and analyze, the easier it becomes to find the best chords to play. If you look at the previous scale and chords, you will notice that the notes C and G appear in more than one of the chords. This means that if you were harmonizing a melody in the key of C, you could try both chords wherever one of these notes appear on the first beat of a bar and see which sounds best. Here is a melody in C major harmonized with chords I, IV and V. Learn it and then transpose it to all the other keys.