Buy or download the basic scales in notation. The most useful scales are major, minor and chromatic. Practice slowly and accurately. Do not practice mistakes. Play each scale in whole notes, half notes and quarter notes. Use one quarter of each session practicing scales and consider it warm-up.
Set a metronome at a speed that complements correct note playing. Try a setting of 72 to 80 beats per minute to start. Raise the speed in small increments when confidence and accuracy are ensured. Begin to challenge yourself with eighth notes and push the tempo faster.
Learn a broader range of scales. Whole-tone scales are used in romantic and impressionist music. Pentatonic scales are used extensively in blues, rock and jazz. Scales abound with variations from different eras and cultures. Work through each slowly, as above, repeating many times. The more you practice, the sooner the scales will become part of natural playing.
Close your eyes and begin to play any scale, note for note. Amazingly, even the beginner will come to understand how these simple exercises integrate you and the instrument through repetition. Glance at the notation when memory fails.