Here's the key of C.  Just like any other key, it's a menu of  7 different notes that melodies and chords are chosen from.

key of c on the piano keyshot
down arrow

 Every note is numbered 1 thru 7

1  2  3 4  5  6  7

 Every note also has a corresponding chord.  There's the 1 chord, 2 chord, 3 chord etc. 

key of c on the piano keyshot

1         4  5 

down arrow

 ...But it's the 1, 4 & 5 chords that are the most functional chords in every key. 

Here's why these chords will work in virtually any song.

 All three of them are made up of every note that's in the key!

F chord on the piano
G Major illustrated in the context of the key of C
C Major illustrated in the context of the key of C

1      3      5

4      6     1

5     7      2

1 Chord

4 Chord

5 Chord

 So in order to find a chord that will fit a particular melody note, just choose a chord that has that melody note in it. 

...For Example

c noteshot
down arrow
C Major illustrated in the context of the key of C

or

c noteshot
down arrow
F chord on the piano
G Major illustrated in the context of the key of C
down arrow
a fits into the f chord

C

C

B

or

g fits into the g major chord

A

down arrow

or

F chord on the piano

You get the idea.  You should also notice that some notes will fit into more than just one chord.

That's all there is to understanding the 1 4 5 chord progression.  They work in every key.  If you're familiar with Color Score I should tell you that I reassigned the colors in the chords to illustrate how they relate to the key of C.  If you want to learn more about how to play piano in a unique and visual way, click here.