Lesson 1 — What a scale is
A song in G uses chords G, C, D, Em. Take the notes inside those chords and line them up low to high:
G A B C D E
That list is a scale — the alphabet of allowed notes for melodies and riffs over that song. Notes in the list sound right. Notes outside sound off.
Practice: next time you play G, C, D, Em, hum or pick single notes from G A B C D E over the top. Anything else, your ear will flag as wrong before you know why.