There are a couple of ways of implementing this. A mechanical, springloaded rod that is entered between the spokes. Some kind of mechanical counter is used to ensure the villainous cyclist has got enough speed (indicated by rotations) before ejection. Or a remote controlled device (again with a springloaded rod that is entered between the spokes. This allows for more user control, and prevents injury of the owner of the device forgets to deactivate it before getting back on.
[Note: the post is intended for humor only - such a device could cause serious injury and should not be tried at home]