In order to learn scales, you must understand how they are built. Although there are several modes from which to choose, the standard keyboard repertoire of today uses mainly two: major and minor. There are twelve each of the major and minor scales, all of which are built on a series of half-steps and whole-steps. A half-step is the very smallest interval found in Western music, for instance, from D to D-sharp, or from E to F; a whole-step is comprised of two half-steps, i.e., from C to D, or F-sharp to G-sharp.
The formula for a major scale is whole-step, whole-step, half-step, whole-step, whole-step, whole-step, half-step. The formula for a natural minor scale is whole-step, half-step, whole-step, whole-step, half-step, whole-step, whole-step. Knowing these formulas allows you to figure out any scale, whether you know the key signature or not.
A good method for quickly learning scales is to organize them into groups. First, split them into major and minor, and tackle learning the major keys first. Next, group the major key scales into their fingering patterns. The fingering pattern for C-major is 1, 2, 3, 1, 2, 3, 4, 5 in the right hand and 5, 4, 3, 2, 1, 3, 2, 1 in the left hand. The same fingering is also used for the D-major, E-major, G-major and A-major scales.
F-major and B-major fall into another category, wherein one hand uses the typical C-major fingering, while the other either starts or ends on the fourth finger. When playing black key scales, avoid using your thumb on the black keys, so group these scales together and learn them as a unit. Once you have mastered them, you can move on to the minor scales. Each minor scale has three variants: natural minor, harmonic minor (it contains a raised seventh step), and melodic minor (it contains raised sixth and seventh steps on the way up and is a natural minor on the way down). Learn all three variants for each of the twelve minor keys.
Crossing your thumb under the other fingers is a crucial step in being able to fluidly play scales. You can begin learning your scales using this exercise: Using the key of C-major, begin with your third finger of the right hand on E. Cross your thumb under to the F, and then play the G with your second finger. Do this back and forth, eventually adding your second finger on D, and then your thumb on C. Practice this way until your thumb moves smoothly back and forth. Devise a similar exercise for the left hand.
Each major and minor key has seven native chords that exist within it. A basic tonic chord is formed using the first, third and fifth notes of every scale. This is the first chord you should learn for every key. The next most important chords are the dominant (based on the fifth, seventh and second notes of each scale) and the subdominant (based on the fourth, sixth and first steps of each scale). These three chords help you to recognize cadences and compose basic songs. After this, move on to learning the other chords to add more complexity to your music.
Get a reference book, like Hanon's "The Virtuoso Pianist" to help you keep all of your fingerings and exercises straight. This way, you can make notes and get accustomed to reading music and key signatures.