Answer: They use the same mechanism humans do: cats use their voice box to produce sounds.
It all starts with the air that comes from the lungs. That air is pushed through the trachea and into the vocal cords. This airflow causes the vocal cords to vibrate, which in turns produces the meow sound.
Cats then modulate each meow to express different things. Experts and cat owners agree that cats use different meows for different things.