Both fractures and sprains can be mighty painful injuries to try and run through. And if your leg is, in fact, fractured, you definitely do NOT want to try and run on it. That will likely just lead to a worsened fracture, and maybe even to a complete bone break. The main difference between a stress fracture (or just a fracture) and a sprain is that a fracture involves minor breaks in the bone. They are not clean breaks that go all the way through (i.e. if you were to completely break your leg or arm in half) but are smaller breaks and cracks in the bone. Stress fractures, in particular, consist of multiple very small, hairline fractures in the bone. When treated properly with plenty of rest, anti-inflammatory procedures and pain killers, stress fractures typically heal easily within four to six weeks. Even larger sized fractures will heal in about eight weeks, so long as you do not run on them. Sprains, on the other hand, involve tendons and ligaments instead of bones.
As a general rule of thumb, if the pain is concentrated in the soft tissues around the bone, it is more likely that you have a sprain and not a fracture. If the pain throbs within a bone and it is agonizing to put weight on or try to walk on, chances are it is a fracture. Fortunately, both injuries heal properly and completely so long as you stick to a doctor's orders of RICE (resting and probably not putting much weight on it at all, icing it, compression, and elevating it). With sprains, the recovery time might be even faster than a bone, as tendons and ligaments do not typically take as long to heal. However, if do not allow a sprain to heal properly, you put yourself at an increased risk to develop arthritis or arthritic symptoms with a sprain.
No matter what your injury ends up being though, you should absolutely stop all activity until you can see a doctor and be examined and assessed. Your health is too important for you to risk injuring yourself worse!