GayGoblin is right. It is a bit hard to explain simply, and I would also highly recommend taking a music theory class if you can. You wont regret it! That said, I'm going to try to explain the very simplest layer of this. Please be aware that I'm running on very little sleep
Ok, let's imagine that we are playing a song in the key of C Major. Obviously the scale for this key (having 7 naturals) is: C - D - E - F - G - A - B - C. Ok, and that makes the chords that exist in this key (put simply):
1 2 3 4 5 6 7
Cmaj - Dmin - Emin - Fmaj - Gmaj - Amin - B diminished.
Ok, now lets imagine that we are just jamming on a C Major chord for the sake of simplicity.
I'm assuming that you know what a C Major chord looks like on a guitar (But just incase):
OK! NOW the notes that exist in the C Major triad are C - E - G. So, if you are playing any of those three notes in any octave, you are playing either the root, third or fifth of that chord. But obviously, just playing inside the chord is boring. So let's say that you throw a D in there. What you are doing basically is adding a note over top of that chord. Depending on what octave you play it in, it will stick out to listeners more. So, really what you are doing when you play that D (and for the duration that the note is held) is basically creating a C add9 chord:
This isn't really a chord change, but the ears of people listening will hear that note in there and it will speak as part of the chord. The same works if you play say... the 7th of the key, B natural in this case. What you are doing when playing a B over a C chord is sounding a 7th which creates, in essence, a C major 7 chord
This basic idea applies to pretty much all the notes in the key. Sometimes, a note wont sound entirely right over a chord, but that is actually a musical idea called "dissonance" which can be used. And now I feel like I'm getting too complex, but I hope this was at least a little bit understandable. Let me know if you want me to elaborate on anything. I love talking about music theory