Gas (Propane or natural gas) enters into the stove set up via a pipe (duh I know) from the wall or floor behind the stove. Tracking it to the stove top it goes to the valves (knobs) which controls the flow of gas. From there it goes to its designated burner.
From each of these is a small tube that tracks back to the pilot light which is fed with another small pipe of gas. The burner assembly beneath the stove top is designed in such a way as to allow air to flow into the main near the burner – or even at the burner itself - where the air mixes. When you turn the knob (open the valve) gas flows up and back through that tube to the pilot light. The gas ignites and burns up all of the gas in the tube and continues burning as gas flows into the system at the burner.
Mind gas flows upward at a heat source creating a partial vacuum. What that means is that at first the gas flows back down the pipe to the pilot burner, but as soon as you have a heat source the air flows to the flame of the burner, a minor suction or partial vacuum is created.
If you look at the burner and the burner assembly it is attached to you may note that there are holes or even another small length of tubing going no where. That tube or those holes regulate how much air mixes with the gas to give you the cleanest burn possible. Different models introduce the air differently.
The designs take advantage of the small fact that gas is lighter than air (tend to flow upward) and that heat causes a suction.
http://www.repairclinic.com/0100_4.asp gives a detailed illustration of the burner assembly (just hover your mouse pointer over the different parts) Note that illustration combines both pilot and electric spark ignition technology. However the burner assembly includes the pilot light.