The trebuchet was a medieval siege weapon designed to throw a projectile a great distance through the air. The trebuchet originated in China sometime between the fifth and third centuries BC. From there it spread to the west, reaching Europe around 500 AD.
Although it is usually thought of as a type of catapult, the trebuchet is in fact a gigantic sling attached to a lever. The shorter arm of the lever carries a counterweight, while the longer arm carries the sling that throws the projectile. In operation the sling end is pulled towards the ground (lifting the counterweight in the process) and held in place by a trigger while a projectile is loaded into the sling. When the trigger is released, the counterweight falls and the sling flies up and above the machine, releasing the projectile at the top of its arc.
Constructed properly, trebuchets could fire very heavy loads. In modern reconstructions using trebuchets built with the original tools and materials, trebuchets have been able to throw projectiles weighing as much as 300 kilograms. Aiming the trebuchet was difficult and required some practice and knowledge of engineering - both of which were usually in short supply for medieval operators. Trebuchets were also extremely heavy and almost immobile; this, combined with their slow rate of their fire, made them impractical for anything except siege operations.
Although the Chinese were the first to develop the trebuchet, by the time of the Mongol invasions the Chinese had fallen behind other parts of the world in siege technology. This was due to the fact that China had been politically united for long periods of time, preventing the formation of strong fortresses across the country, and the traditional enemies of the Chinese were nomadic warriors - not fortified city-dwellers. Nevertheless, the Chinese were still far more advanced in siege warfare than the Mongols, and it was not until the Mongols adopted Chinese practices that they began to have success capturing enemy fortifications.
Late in the conquest of Song China, Mongol leader Kublai Khan brought in Arab engineers from the Mongol holdings in Persia to build hinged counterweight trebuchets, which were more advanced than anything yet seen in China. With the aid of these powerful weapons, Kublai was able to take the previously-impenetrable fortress of Xiangyang in 1273, and from there rapidly take the rest of Song China's cities, completing his conquest of the Song Empire in 1279.