Answer:
Where an bow could fire an arrow that could cause a single casualty, the projectiles of catapults could be destructive on a larger scale.
Some catapults of the ballista type, which threw gigantic arrows, were used early in the middle ages, before castles were made with thick stone outer walls, and they could penetrate the wooden palisades and doors of early castles.
Later in the middle ages, catapults such as the onager, which had a arm with a cup on the end, could throw rocks against walls with enough force to chip away at them, eventually to cause a breach. They could also throw incendiary devices against gates and other vulnerable places.
Trebuchets were huge things that could toss heavy objects over walls. The included incendiary devices, but also include such things as the dead bodies of various animals or, more deadly, people who had died of epidemic diseases, over wall.
Catapults passed out of use with the introduction of cannons.