How much time you take out will really depend on what kind of injury it was you had in the first place, as well as the severity of it. Without knowing the full extent of your injury, I wouldn't be able to say for certain when you should return to running.
You may find it helpful to know, however, that a muscle strain tends to get better after 2-3 weeks. There's still the potential for further damage to occur by returning to exercise too soon though, so strenuous exercise like running should be avoided for around 6-8 weeks. Gentle exercises like swimming and walking in addition to the likes of weight training on non-affected muscles will keep up activity levels whilst the muscles recover.
Take our quick quiz to discover just how healthy your immune system is, as well as some useful information about your general health and wellbeing!