When people say that their "hip hurts", they are actually often pointing to the side of their upper thigh. Localized and persistent pain in this area is not technically the hip - but the hip bursa or tendon. This almost never requires surgery and can be treated with oral anti-inflammatories, icing, stretching and physical therapy. Sometimes a cortisone injection can do wonders.
Pain in the groin or thigh region related to hip motion may actually be hip arthritis (wear and tear in the hip joint). This often needs to evaluated by an x-ray and may require surgery or physical therapy. Your doctor can best sort out your particular type of hip pain.