It is important that you do not wait until you have an injury to change your running shoes. As a rule of thumb, a running shoe should be replaced between 300-500 miles. For example, If you run 15 miles per week, that would mean changing your shoes every 6 months.
There are other factors that are also important when considering when to change your shoes, to name a few: the type of runner you are and the presence of wear on the bottom of your shoe, the type of surface you run on (concrete or pavement vs track ), your body weight and pre-existing maladies (knee and hip pain) will require you to change your shoes more frequently.
In addition, if you noticed abnormal wear pattern on your shoes, this may indicate biomechanical/ structural pathology that would require orthotic devices in addition to good running shoes.