That sounds like it could be sciatica, which is a vague term for painful conditions involving the sciatic nerve. The nerve starts out at the spine, where nerve 'roots' exit the spinal cord and pass through small openings between the bones of the spine; the roots can be pinched at this level by arthritic changes or disc herniations. The nerves they join together to form larger branches, and eventually form the sciatic nerve; the nerve passes through the muscles of the buttocks, and this is another location where the nerves can be compressed.
When the nerve or nerve roots are compressed, the person feels pain in the areas that the nerves connect to-- the backs of the legs, and all the way to the feet.
The work-up would usually start with a physical exam, looking for areas of sensation loss or weakness; the person would usually also have a CT or MRI (the MRI is much more sensitive) to see if the discs are putting pressure on the nerve roots. Other tests include an EMG and plain x-rays. Treatment includes steroids by mouth, or injections of steroids in the area next to the nerves, in the epidural space. If the problem is a disc herniation, they usually recover on their own after a number of months, but they can require surgery in some people.