Though the definitions for types of catapults vary, each shares this goal: to hurl an object through the air. There are are three primary technologies that fall into the "catapult" category.
1. The catapult: the winched-down bucket that people normally think about when they hear the word "catapult" (see this page for a picture).
2. The ballista is a very large crossbow (see this page for a picture).
3. A trebuchet is a weighted beam that swings a sling carrying the projectile (see this page for pictures).
Both catapults and ballistas work by storing tension either in twisted ropes or in a flexed piece of wood (in the same way an archery bow does, but on a larger scale).
A trebuchet tends to be easier to build because it consists simply of a pivoting beam and a counterweight that rotates the beam through an arc.
Catapults can launch things a fair distance -- 500 to 1,000 feet (150 to 300 meters) is common. It is surprising how much energy they can store. The gears are important, because they create a winch. The winch allows a person to put a great deal of energy into the catapult over a period of time. Then all of the energy releases at once, throwing the projectile.