Popular music, and almost all music anywhere in the world, is tonal; that is, it's melodies and harmonies tend to be centered around a single musical pitch called a tonic (root).
A group of pitches arranged in steps around a tonic is called a Scale, and the scale that forms the basis of most melodies is the Major Scale. The major scale is also known as a Diatonic Scale, meaning that it contains all seven tones of the musical alphabet (called scale degrees or steps), arranged in a particular pattern above the tonic. The pattern, or formula, for the major scale is made up of an ascending series of whole steps and half steps. This formula never varies, regardless of the tonic on which it begins.
Understand the formula for the Major Scale (the Minor Scale and other scales have different formulas). Play and memorize the C Major Scale below.
Play the Major Scales below. Realize that it's the same Pattern being played; at different starting points. If you start the Major Scale Patten at a G; the scale name is G Major Scale. If
you start at an A the scale name is A Major Scale.
Play the scales consecutively until you have them memorized.