You fix it by first finding out what's causing it. Depending on your age, you might have arthritis in your hip. A doctor can tell you. A non-prescription drug (glucosamine) can help ease some of that pain for arthritis sufferers. Doesn't work for everyone, but I think it helped with my knee.