When released the weight drops, the beam rotates, and the rock slides down the track in the sling. When free of the track the sling rotates very quickly up and over the beam and slips off a hook. The rock spills out of the sling and flies away. Trebuchets are not to be confused with catapults. Catapults are sad little things.
Trebuchets are much better than catapults.
A really large trebuchet can reach out and squish a catapult with a half ton rock at 200 yards or more. This is a little toy trebuchet that I made to learn on. All beginning trebuchet builders must make such a model and study it well before attempting a larger one. This one would throw 12 yards. It is not made to look at.