Sometimes my right leg cramps up so badly that I can't move it. My leg and foot were both stiff and I couldn't stand on my right leg. What can I do?

See your doctor. You should be examined by a physician to determine the cause of your symptoms. What you are describing can be caused by the nerves, muscles, bones, or circulation. It sounds like it is affecting your mobility and quality of life- and should be addressed soon!
Orthopaedic evaluate. If tightness/cramping occurs with activities (walking/jogging), you may have exercise induced exertional compartment syndrome. With this, the tightness and cramping should resolve with rest and usually is provoked and becomes symptomatic at a set time point (e.g., always at 0.5 miles into a run). More rare causes of cramping may be related to irregular blood flow. Seek an orthopaedic evaluation.