The Barbican wall was built around the original Citadel’s main door to defend its access.
Such structures became common in the 14th century, as military sieges depended more and more on the use of heavy missiles and primitive artillery pieces to break the enemy’s walls.
You will notice, all along the barbican’s wall, several long vertical openings.
These allowed the use at short range of crossbows and firearms against any assaulters approaching the fortress, while keeping the defenders safe.
Turn right once you get to the bottom of the steps, and walk along the paved road and turn left to go to the Archaeological Site of the Castle.