A warm-up routine is the first step on how to prevent knee pain when running, Before running warm-up routine should last for 5-10 minutes.