Most everyone has used a gumball machine. You put your coin in the coin slot and turn the crank, and a gumball falls out the chute. The key piece of the machine is a disk inside that collects gumballs one by one and drops them into the chute for the customer.
Imagine a thick disk made of metal. In the center of the disk is an axle. Around the outside edge of the disk are holes that are big enough to hold one gumball. The disk is sitting flat in the bottom of the clear tank that holds all the gumballs.
When you turn the crank, it rotates the disk so that one of the holes lines up over the top of the chute. A gumball in the disk drops into the chute.
The empty holes in the disk are rotating under the pile of gumballs in the tank, so the empty holes get filled by gravity as the disk rotates.