When you run - for real, with real forward progression - you are in control. As you tire, what happens? You slow down, of course! Not so on a treadmill. We typically set a speed and stick with it the whole way, for better or for worse. Some can maintain that steady pace, but most can not. As we tire, we'll naturally shift the upper body forward and the running gait will be more unnatural. What will happen? The anterior muscle group of the lower extremity (the front of the leg) will be overworked, as will the Achilles tendon. Then comes the pain...shin splints most commonly along with Achilles pain.
So what do you do to stop it? Well, just slow down! Not by a lot...every so often, maybe after the first third of the run or walk, lower the speed by 0.2 mph. This will allow for the natural fatigue of your body.
If you wait too long and start to feel some discomfort, drop the speed even more, by as much as 0.5 mph to even a full mph. Then, depending how you feel, slowly increase your speed. If the pain persists, be sure to visit your podiatrist sooner than later.
A treadmill is not meant to be a passive experience. Be sure to listen to your body and make appropriate adjustments along the way.