Catapults were used in ancient and medieval warfare until the introduction of the gunpowder cannon in the 14th century. A catapult could hurl large stones, spears, or other projectiles at an enemy, but was difficult to aim.