Once the pilot valve has been set to the "pilot" position, lighting a pilot light simply requires using a match or lighter. After the pilot light is producing a steady flame, the valve can be set to the "on" position, which indicates that the unit is ready to work.
Igniting a fuel requires having a source of combustion, and pilot lights are one of the oldest ways to ensure a furnace can start producing heat when needed without intervention. Newer units have a sensor near a pilot light that detects if it's burning warm enough to ignite natural gas. It also turns off the flow of natural gas to the pilot light if the flame is extinguished.
However, pilot lights present a few potential dangers. Before lighting the pilot light, the pilot valve should be set to the "off" position for at least three minutes. Excess gas in the air can ignite, which can cause burns. Pilot lights are also an open flame source. Newer units typically have pilot lights covered well, but an errant piece of combustible material can cause a fire.
Almost all newer furnaces have electrical ignition systems instead of pilot lights. These systems produce a spark once gas begins flowing, which eliminates the need the constant flow of gas to keep a pilot light burning. In some cases, these systems can be installed on older furnaces, which can lead to savings over time.