Position your fingers on your instrument so that you can play the notes of the major scale. You can do this in any key.
Follow the steps a major scale takes. These are the steps: First note, whole note, whole note, half note, whole note, whole note, whole note, half note, and finally you are back to the high note in your scale. Whole notes skip a note in between playing, and half notes are the very next note you play in order. You can remember this pattern by thinking, "Two wholes, half, three wholes, half. Major is as simple as that."
Practice these steps as often as you can, going forward and backward on the scale. You can now play any key's major scale if you understand the notes and their patterns.
Position your fingers on your instrument so that you can play the notes of the minor scale.
Follow the minor scale pattern. The pattern is: first note, whole note, half note, whole note, whole note, whole note, half note, whole note to the high note in the scale. You can now play a minor scale in any key. You can remember this as, "Whole, half, three wholes, half, whole. Minors play a much trickier role."
Practice playing minor scales in many keys. Your fingers will get used to the patterns and in no time you will have the major and minor scales learned.