A knight spent all those years practicing with swords and lances for a good reason. It prepared him to defend the lord and lady he served and the castle that was their home.
Sometimes this meant charging onto a battlefield for bloody combat. Just as often, the knight’s job was to keep enemies from breaking down the castle walls, getting across the moat, and forcing their way into the castle.
Attackers always tried first to take a castle by force. But if this failed, they had a second plan of attack called a siege. During a siege, the attackers surrounded the castle to keep anyone from leaving or from coming in. Then they waited, hoping those inside would soon run out of food and other supplies and give up.