The numbers represent the viscosity of the oil and the W stands for WINTER.
The long answer:
The Society of Automotive Engineers (SAE) has established a numerical code system for grading motor oils according to their viscosity characteristics. Because the viscosity of oil changes with temperature, multigrade oils were developed to provide protection across a range of temperatures. This is why you would see something like this on the label: SAE 5W-30.