The legs, half of your body, and mostly which is not targeted by all, there are several muscles in legs but I am gonna cover only three major muscles that you need to know, therefore that legs work everywhere.
Legs muscle workout
Quadriceps Muscle
A quadriceps are a group of muscles on the front of your thighs. These muscles are called the rectus femoris, then vastus intermedius, the vastus medialis and the vastus lateralis. The quadriceps are also known simply as the quads.

Rectus Femoris Muscle
The rectus femoris muscle is attached to the hip and helps to extend or raise the knee. This muscle is also used to flex the thigh. The rectus femoris is the only muscle that can flex the hip.
Exercise:
• Wall Squat (30-60sec hold)
• DB or Barbell Lunges
• Waking Barbell or DB Lunges
• Split Squat
• Heck Squat
Vastus Intermedius Muscle
The vastus intermedius muscle is located along the upper portion of the femur, which is also known as the thighbone. It is directly underneath and ends at the rectus femoris muscle, which is part of the quadriceps cluster of muscles.
Exercise:
• Leg Extension (Toe pointing upward)
• Leg Press (Toe straight)
• Single Leg Press (Toe Straight)
• Lunges
• Squat on Smith machine (shoulder width stance)
Vastus Medialis Muscle
The vastus medialis muscle is a part of the quadriceps muscle group, located on the front of the thigh. It is the most medial, or inner, of the quadriceps muscles. We also called it Tear Drop Muscle.
Exercise:
• Leg Extension (Toe pointing outward)
• Leg Presses (Toe pointing outward)
• Single Leg Press (Toe pointing outward)
• Cross Lunges
• Squats (Toe pointing outward)
• Step Ups
Vastus Lateralis Muscle
The vastus lateralis muscle is located on the side of the thigh. The vastus lateralis muscle is to extend the lower leg and allow the body to rise up from a squatting position.
• Leg Extension (Toe straight and narrow stance)
• Leg Presses (Toe straight and narrow stance)
• Single Leg Press (Toe straight and narrow stance)
• Side Lunges
• Squats (Narrow stance)
• Step Ups
Hamstring Muscle
The hamstrings cross and act upon two joints – the hip and the knee. Semitendinosus and semimembranosus extend the hip when the trunk is fixed; they also flex the knee and medially (inwardly) rotate the lower leg when the knee is bent.

Biceps Femoris
Biceps femoris has two heads Long Head & Shot head, as you can above the picture both perform knee flexion.
Exercise:
• Barbell Stiff-Leg deadlift
• DB Stiff-leg Deadlift
• Standing Hamstring curls
• Good Mornings
Semitendinosus Muscle
The semitendinosus muscle lies between the other two. These three muscles work collectively to flex the knee and extend the hip.
Exercise:
• Seated Leg curl
• Laying Leg curl
• Romanian Deadlift
• Lunges
• Hamstring stretch on the floor
Semimembranous Muscle
Its function including enabling the leg to flex and rotate, and serving as a thigh extensor. An injury to the semimembranosus muscle is referred to as a hamstring injury.
Exercise:
• Seated Leg curl
• Laying Leg curl
• Lunges
Calf Muscle
The gastrocnemius and soleus muscles taper and merge at the base of the calf muscle. Tough connective tissue at the bottom of the calf muscle merges with the Achilles tendon. The Achilles tendon inserts into the heel bone. Its function is plantar flexing the foot at the ankle joint and flexing the leg at the knee joint.

Gastrocnemius Muscle & Soleus
The gastrocnemius, its function is plantar flexing the foot at the ankle joint and flexing the leg at the knee joint. They are powerful muscles and are vital in standing, walking, running, and dancing.
Exercise for Gastrocnemius Muscle :
• Standing Calf raise
• Calf raises on the leg press machine
• Donkey calf raise
Exercise for Soleus:
• Seated Calf Raises
• Seated calf extension
• Soleus stretch