The most common and major risk factor for shin splints is overuse or excessive loading of the muscles and tissue. New runners and athletes are especially susceptible to shin splints as they often overload their workouts and don't take enough rest. Inexperienced runners also may not know the importance of stretching before and after workouts, especially for your shins and muscles supporting your shins such as ankles and hips.
Other risk factors for shin splints that any runner may run into include running on hard or uneven grounds, suddenly increasing the intensity of exercise, or having an improper form that places stress on the muscles. Bad form caused by flat arches or pronation can lead to some of the most extreme cases of shin splints and stress fractures.
However, there are many ways to help prevent some of these risk factors. Stretching and strengthening exercises such as calf raises and low ankle lunges are great for reducing pain and preventing further injury. In addition to strengthening your muscles, always invest in solid training shoes and keep track of your their miles so your ankles and shins can be properly supported.
If your running terrains are hard on your shins, try some cross-training with less impact like swimming or biking. Taking shorter strides may also help in some cases as it puts less pressure on your shins and knees. Flat arches can be helped with arch supports or shock-absorbing insoles.
If you already have shin splints, there are ways to lessen the pain. Following the basic RICE principle (Rest, Ice, Compression, Elevation), they may be able to heal on their own, but always see a doctor before it becomes too unbearable. If the shin splints are more bone related, a doctor can give you a proper diagnosis and make sure your legs are getting the necessary rest.
If the shin splints are more muscle related, rolling and stretching them can help sooth the inflamed fascia while helping to heal. Over-the-counter treatments like ibuprofen, anti-inflammatory creams, and compression socks will help short term pain. Remember that dynamic rest is the best treatment -- sacrificing a couple weeks or months of training in order to have healthy legs will be worth it.