The two types of pain fibers enter different layers of the dorsal horn. Ad fibers enter the posterior marginalis and the nucleus proprius, and synapse on a second set of neurons. These are the secondary afferents (purple, below) which will carry the signal to the thalamus. The secondary afferents from both layers cross to the opposite side of the spinal cord and ascend in a tract called (logically) the spinothalamic tract. Tracts are always labeled from beginning to end.
The C fibers enter the substantia gelatinosa and synapse, but they do not synapse on secondary afferents. Instead they synapse on interneurons - neurons which do not project out of the immediate area. The interneurons must carry the signal to the secondary afferents in either the posterior marginalis or the nucleus proprius.
The spinothalamic tract ascends the entire length of the cord as shown above, and the entire brainstem, staying in about the same location all the way up. Below are representative slides showing the tract in the medulla and midbrain. Notice that by midbrain the spinothalamic tract appears to be continuous with the medial lemniscus. They will enter the VPL of the thalamus together.
The spinothalamic system enters the VPL, synapses, and is finally carried to cortex by the thalamocortical neurons. Here is a schematic of the entire pathway:
E. Pain control:
It has been recognized for centuries that opium and related compounds (such as morphine) are powerful analgesics. Several decades ago scientists hunted down the opiate receptor which was responsible for the potent effects. They then reasoned that if there was such a receptor in the body, maybe the body used its own endogenous form of opium to control pain. (It has also been recognized for centuries that under certain circumstances, i.e. the heat of battle, a serious wound may not cause pain.) This hypothetical compound was named "endorphin", from endogenous-morphine. Soon after, an entire class of peptide neurotransmitters was discovered that interacted with the opiate receptor, and now includes endorphins, enkephalins, and dynorphins. Synthetic, exogenous forms of these compounds continue to be discovered, prescribed, and abused, and are classed under the general term, "narcotics".
There are opiate receptors throughout the central nervous system. In the dorsal horn, they are located on the terminals of the primary afferents, as well as on the cell bodies of the secondary afferents. Opiate interneurons in the spinal cord can be activated by descending projections from the brainstem (especially the raphe nuclei and periaqueductal grey), and can block pain transmission at two sites. 1) They can prevent the primary afferent from passing on its signal by blocking neurotransmitter release, and 2) they can inhibit the secondary afferent so it does not send the signal up the spinothalamic tract.
F. The proprioceptive system:
The proprioceptive system arises from primarily the Aa afferents entering the spinal cord. These are the afferents from muscle spindles, Golgi tendon organs, and joint receptors. The axons travel for a little while with the discriminative touch system, in the posterior columns. Within a few segments, however, the proprioceptive information slips out of the dorsal white matter and synapses. After synapsing it ascends without crossing to the cerebellum.
Exactly where the axons synapse depends upon whether they originated in the legs or the arms. Leg fibers enter the cord at sacral or lumbar levels, ascend to the upper lumbar segments, and synapse in a medial nucleus called Clarke's nucleus (or nucleus dorsalis). The secondary afferents then enter the dorsal spinocerebellar tract on the lateral edge of the cord.
Fibers from the arm enter at cervical levels and ascend to the caudal medulla. Once there they synapse in a nucleus called the external cuneate (or lateral cuneate) nucleus, and the secondary axons join the leg information in the dorsal spinocerebellar tract.
The spinocerebellar tract stays on the lateral margin of the brainstem all the way up the medulla. Just before reaching the pons, it is joined by a large projection from the inferior olive. These axons together make up the bulk of the inferior cerebellar peduncle, which grows right out of the lateral medulla and enters the cerebellum.
The figures above outline the course of the dorsal spinocerebellar tract. Surely, there must be a ventral spinocerebellar tract? Naturally, there is, and it travels in approximately the same place - the lateral margin of the spinal cord, just ventral to the dorsal spinocerebellar tract. The two cannot be distinguished in a normal myelin stain. The ventral spinocerebellar tract seems to defy the ipsilaterality of the cerebellum, because the fibers entering it in the spinal cord actually cross on their way into the tract. However, they (somewhat inefficiently) cross back before entering the cerebellum. Therefore the cerebellum still gets information from the ipsilateral body.
A note about generalizations:
There is actually a fair amount of mixing that goes on between the tracts. Some light touch information travels in the spinothalamic tract, so that lesioning the dorsal columns will not completely knock out touch and pressure sensation. Some proprioception also travels in the dorsal columns, and follows the medial lemniscus all the way to the cortex, so there is conscious awareness of body position and movement. The pain and temperature system, although it does ascend to somatosensory cortex, also has multiple targets in the brainstem and other areas.
For a more interactive tutorial on the anatomy, and for stunning three dimensional pictures of these pathways, try the Digital Anatomist in the "Other links" section.