The tibial nerve is a branch of the sciatic nerve. The tibial nerve passes through the popliteal fossa to pass below the arch of soleus. Structure
Popliteal fossa
The tibial nerve is the larger terminal branch of the sciatic nerve with root values of L4, L5, S1, S2, and S3. It lies superficial (or posterior) to the popliteal vessels, extending from the superior angle to the inferior angle of the popliteal fossa, crossing the popliteal vessels from lateral to medial side. It gives off branches as shown below:
Muscular branches - Muscular branches arise from the distal part of the popliteal fossa. It supplies the medial and lateral heads of gastrocnemius, soleus, plantaris and popliteus muscles. Nerve to popliteus crosses the popliteus muscle, runs downwards and laterally, winds around the lower border of the popliteus to supply the deep (or anterior) surface of the popliteus. This nerve also supplies the tibialis posterior muscle, superior tibiofibular joint, tibia bone, interosseous membrane of leg, and the inferior tibiofibular joint. Cutaneous branches - Tibial nerve also gives off a cutaneous nerve called the medial sural nerve from the middle of the popliteal fossa and exits at the inferior angle. It supplies the skin of the lower half of the back of the leg and lateral border of the foot until the tip of the little toe.
Articular branches - There are three articular branches arises from the upper part of the fossa: superior medial genicular nerve (located on the surface of medial condyle of femur, middle genicular nerve (pierces the posterior capsule of the knee joint to supply the structures located in the intercondylar notch of the femur, and inferior genicular nerve (runs along the upper border of the popliteus to reach the medial condyle of tibia). Back of the leg
At the inferior angle of the popliteal fossa, tibial nerve passes deep to the tendinous arch of soleus to enter the back of the leg. In the leg, it runs downwards and medially to reach the posteromedial side of the ankle, midway between the medial malleolus and medial tubercle of the calcaneum. It terminates deep to the flexor retinaculum at the origin of the abductor hallucis by dividing into medial and lateral plantar nerves to supply the foot. The tibial nerve gives off several branches to supply the back of the leg:
Muscular branches - Supplies tibialis posterior, flexor digitorum longus, flexor hallucis longus, and deep part of soleus. Cutaneus branches - The medial calcaneal nerve pierces the flexor retinaculum to supply the skin of the back and lower surface of the heel. Articular branches - Supplies the ankle joint

Foot
In the foot, the nerve terminates by dividing into medial and lateral plantar branches. Medial plantar nerve - It is the larger terminal branch of the tibial nerve. It passes between the abductor hallucis and flexor digitorum brevis to divide further into branches.