Learn to recognize scale patterns. The major scale pattern is always the same. The name changes depending upon your starting note. C-D-E-F-G-A-B are the notes in a C major scale. The formula (pattern) for any major scale is whole step, whole step, half step, whole step, whole step, whole step. If you apply this pattern to any set of notes from the chromatic scale, you will find the notes in the key that matches your starting note. Applying this formula and starting on G gives the notes of the G major scale: G-A-B-C#-D-E-F#.
In the chromatic scale, every note has a sharp or flat between it except B to C and E to F. This makes the distance between every note a whole step, except from B to C and E to F. Those notes are only a half step apart. A good way to visualize this is by looking at a piano. You will see two sets of keys that are white keys side by side, not separated by black keys. These are the notes a half step apart. The black keys are the half steps between the rest of the notes; they are the sharp or flat notes.
Naming a note sharp or flat depends upon the direction you move in. Using a piano as an example, if you play a C and move to the black key in front of it, the name of the black key is C sharp. A sharp sign looks like this: C#. If you play the white key in front of the black key and move down to the black key, the C# is called a D flat. A flat sign looks like this: b. Moving up to a note makes it sharp, or raised, and moving down to a note makes it flat, or lowered. The notes sound the same but are read differently.
Memorize the formula for any scale you want to use. There are more scales available than you will need to learn. The major scale is a stating point. Minor scales are next. You can read a minor scale by locating the sixth note in a major scale and playing the notes from your starting note. The relative minor of a C major scale is A minor. This is because the sixth note of C major is A. Reading the notes from A to G gives you an A minor scale. While the notes are the same as the notes in a C major scale, the step pattern (formula) is different: whole step, half step, whole step, whole step, half step and whole step, giving you the notes A-B-C-D-E-F and G.