The benefits of learning guitar scales
Learning to play scales on your guitar can have many benefits. One of the benefits is that you learn the notes of each particular scale, and become comfortable playing those notes. When you play a song in that key, you will already be used to playing each of the notes and will know where they are.
Playing guitar scales also has great technical benefits. Playing scales can help you increase your dexterity, precision, and speed of your playing. If you play scales each time you practice, over time you'll notice your playing skills increasing from this simple exercise.
Learning and playing guitar scales
There are dozens of different scales, but you'll want to start out with a few common ones. The most common scales for guitar are probably C, G, D, & A. I'd suggest that you start with major scales, as they are generally easiest and more commonly used. Later you can go on to minor scales plus other scales.
When you first start learning a scale, play it slow enough that you can play each note correctly and cleanly. As you get better, you can speed it up. However, never play them fast enough that you lose control. When you play a scale, each note should be perfect - clean, and in steady rhythm, tone, and volume. As a teacher of mine once said, "Make your scales like a pear necklace - each note, perfect, round, and beautiful!" Follow this advice and watch your playing improve!