Leg cramps can occur for several reasons. If you are physically active and if the cramps tend to occur just when you are walking or otherwise exercising, then this might just be muscle fatigue, that will respond to stretching exercise or modifying your exercise regimen somewhat. On the other hand, with vigorous exercise, dehydration and loss of electrolytes can also be a problem, and these can also bring on cramps.
In older individuals with a history of diabetes or heart disease or other chronic medical problems, narrowed arteries in the legs may result in something called claudication, which is pain in the legs with walking. This is a serious symptoms, because people with claudication often have significant blood vessel narrowings throughout their body.
Leg cramps that mostly occur at night are a little different from cramps with exercise. If this is what you are experiencing, they tend to be benign but occur in sedentary people, and the solution tends to be increasing the amount of stretching and exercising you are doing during the day to relieve them.
I suggest that you go see your primary care doctor
. As you can see, there are a few potential causes of your leg cramps, some of them serious, and a good physical examination is in order to figure out what is going on and what should be done about it.