The shoulder rest is an important part of playing violin, especially for a beginner. It helps you keep good posture, play with looser (fluid) muscles, and keep you from hurting yourself.
Your body works best when everything is lined up right. Playing the violin makes you twist around a lot already, don't do more twisting around like a pretzel than you have to!
A shoulder rest, if it is the correct type and size for you, will help your posture so that you back stays straight but as relaxed as possible. Your shoulders will still tend to become tired (especially at first) but you will be able to practice and play for longer with a good violin should rest.
Since your muscles won't be twisted up or tensed more than they need to be to play the violin, with the correct shoulder rest, your muscles will be able to focus on playing the violin as well as possible!
When you are playing violin, you want to avoid hurting yourself as much as possible. I remember when I was in a youth symphony when I was younger. We were rehearsing for 4 hours per day for a week before we left. At the time, my playing posture was only "ok".
After I got back from Japan I had to go to the doctor to get treatment for my shoulder. It was short-term pain, but it still hurt!
Protect yourself now by investing in a good violin shoulder rest and using it correctly.
There are many more brands of shoulder rests than these, but these are the ones I typically recommend to my students, depending on their needs and budget.
I've used a Wolf shoulder rest on my viola for years. They tend to be more adjustable than the Kun shoulder rests. You can change the height of the legs, so if you have a longer neck, you'll be able to change the height of the rest. This one is good if you might still have some growing to do, too.
I typically recommend these second. These shoulder rests are good because they prevent the violin from sliding around on your shoulder much. They also promote good posture when playing. They are not as adjustable, though, which might not make them ideal for players who are still growing. These might not work well for people with very short necks or tall shoulders.
These are a distant third, although they're a lot better than the rests shown in the section just below. They tend to be around $10 to $15.They're cheap and somewhat bendable so you can bend them into shape. The feet tend to slip off of the edges of the violin if they're bent too much so beware! They come in three heights: 1, 2, and 3. The lowest is 1 and the highest is 3. People with shorter necks prefer 1's, people with longer necks prefer 3's. If you can, try one out at the music store.
These slip on your collarbone. They're shaped very flat, so they don't grip where they need to. Be careful if you buy a used one: If the rubber on the "feet" of the shoulder rest is wearing down it can scratch your violin.
The biggest thing to remember about these different kinds of violin shoulder rest is to pick one that helps you stay as relaxed as possible as you play, that keeps the violin balanced on your shoulder without slipping or requiring any shoulder tension. That's the key.