The trebuchet was the king of all medieval siege weapons, and in many ways the perfection of such. It would take the invention and military use of gun powder and cannons to make the trebuchet obsolete. The trebuchet had two primary uses: one to batter masonry, or other fortifications, and one to hurl projectiles over a wall. Since warfare was a common way of life from the early Medieval ages, this made the trebuchet a major asset to any invading army.
It is generally believed the trebuchet was invented in China in centuries BC, but it never showed in Europe until around 500 AD. In Europe trebuchets were first used in Italy in the 1100s, and were introduced to England in 1216 during the Siege of Dover. During the siege of Stirling Castle in 1304, Edward Longshanks ordered his engineers to make a giant trebuchet for the English army, named "Warwolf." No details of its design survive.
A trebuchet works by using weight and counterweight. The weapon is loaded, and the counterweight helps to launch the stone, or whatever is used as a projectile. When the projectile is close to a 45° angle with the horizontal, the free end of the sling slips from a hook, and if all goes well, the missile flies towards its target.
The trebuchet was used by invading Mongol hordes, who taught the Europeans about germ warfare. When the Mongols had corpses infected with the plague, they would launch the bodies over the castle walls until the disease ravaged the besieged city. Trebuchets could be used to launch stones into walls, or firey projectiles into the towns themselves. Trebuchets were used by all invading armies on fortified cities: the Spanish used them on the Moors, the English on the French (and vice-versa), the Crusaders against the Muslims.
Firing a trebuchet was not a safe job in battle, though. Because of the time required to load the sling and to raise the counterweight, a large trebuchet's rate of fire was very slow: often not more than a couple of shots an hour. Stones were normally used, but there were many objects thrown: dead animals, beehives, the severed heads of captured enemies, small stones burned into clay balls which would explode on impact like grapeshot, barrels of burning tar, or even unsuccessful negotiators, prisoners of war, and spies catapulted alive. The psychological effects could be as powerful as the stones themselves.
Trebuchets were powerful weapons, with a range of up to about 300 yards. The range of most trebuchets was actually shorter than an English longbow in an archer’s hands, making it somewhat dangerous to be a trebuchet operator during a siege. This meant that sieges could be long drawn-out affairs, sometimes lasting for years at a time. Even with wheels to make them mobile, the trebuchets are so heavy as to still not be very movable. A trebuchet crew too close to the castle were sitting ducks.
Still, there was no weapon that could bring down a castle like a trebuchet, and this weapon still lives in the minds of gamers, as anyone who has played Age of Empires, or Medieval Total War can attest, and those games demonstrated how much easier it was to bring down a gate with a siege weapon then without, and the trebuchet was the king of all siege weapons.