To simplify:
On a turnout (the switch is the electrical device used to operate a remote turnout), from the point where one track starts to separate from the other track, the number refers to how many units of measure (we'll use inches here) the straight track has to run to have one inch of separation from the other track.
So on a #4 turnout, from the point where the rails separate and become two different tracks, the straight track must go 4 inches to be one inch away from the other track, which is angling away from the straight track. On a #6 turnout, you would have to go 6 inches to have one inch of separation, on a #8 turnout you would have to go 8 inches, and so on.
What this means in real life is that the lower the number, the greater the angle between the tracks. So a #4 turnout has a much greater angle between the two tracks than a #8 turnout will. Next time you go to a hobby shop that sell model railroad supplies, compare a #4 turnout to a #8 turnout. The difference will be obvious.
The practical application for this is that a large locomotive does not like to go through a #4 turnout. The drive wheels may bind due to the angle, and it could stop or derail. A small locomotive, or a diesel with only two sets of wheels per truck, would probably not have a problem going through it. A 2-10-4 Texas or a 4-12-2 Union Pacific steam engine would probably not do quite so well.
#4 turnouts are great in freight yards, where the locomotives are usually small, while #6 or #8's should be used any where that your larger mainline locomotives would be traveling. The #4's cost less than 6's or 8's, too, so it's cheaper to use them in freight yards where you would have more turnouts.
Hope that helped!