What's the difference between scale and gauge?

Scale refers to the proportion of the scaled down model with the real thing. For example, HO scale is 1.87 or 87 times smaller than the real thing. N scale 1:160 is 160 times smaller. Gauge is the distance between the railheads. Here is a chart on the most popular scales.
Z 1:220 1.4mm 6.5 mm 5 3/4 inch
N 1:160 1.9 mm 9.0 mm 7 1/2 inch
HO 1:87 3.5 mm 16.5 mm 15 inch
S 1:64 3/16 inch 7/8 inch 22 1/2 inch
O 1:48 1/4 inch 1 1/4 inch 23 inches
GN3 1:22.5 12.5 mm 1 3/4 (#1) 23 5/8 inches

Z 24 foot 0 inches
N 33 foot 0 inches
HO 60 foot 7 1/2 inches
S 82 foot 6 inches
O 120 foot 0 inches
GN3 234 foot 8 inches

An important area to consider is your scale's minimum radius. This will play a major roll in determining the size of your layout.

Here is a brief explanation of the minimum and maximum radii:
  N HO S O
Broad Curves 17 inch 30 inch 41 inch 58 inch
Conventional Curves 14 inch 24 inch 32 inch 46 inch
Sharp Curves 11 inch 18 inch 24 inch 35 inch

Broad curves:
Can run the full length passenger cars and all locomotives including steam locomotives. Appearance of running trains is more realistic.
Conventional curves: Full length passenger cars will not derail if curves are provided by easement curves, all freight equipment except 85' piggy back cars, and all transport cars will operate.

Sharp curves: Cars up to 60' long, switch engines, 4 wheel base and small steam engines.

O and S Scales

These two scales got their start in the 1920's and 1930's. They were mass produced more as toy trains than scale models. Manufactures began making tracks in various widths. For marketing purposes they were numbered No. 1, No. 2, or No. 3.

In 1910, the Ives Company came out with a track narrower than size No.1 and the company called it 0 (zero gauge). The size was a success when Lionel and American Flyer offered their train sets in that size.

Soon it went from being called Zero to O gauge. The tracks were tin plated, hence their name given to Lionel and American Flyer as the tin plates.

Lionel had O and a smaller gauge called O27. This referred to the 27" diameter of the circle it made. The engines and cars were shorter to negotiate the tight curves. American Flyer went to true scale trains, the S scale (1:64). These were truer to real trains and ran on two rails.

Lionel's Ives were running on three rails because three rails were easier to wire than two rails due to the fact that the 3rd (middle) rail was always positive so it did not produce a short circuit on switches and return loops. There is also a scale O gauge available that runs on two rails.

HO Scale (1:87)
     This is by far the most popular scale. Today 75% of the hobby is in HO scale and because of that manufacturers tend to produce more products in this scale.

N Scale (1:160)
     This scale is now #2 in the hobby at 16%. It's a smaller size and excellent for apartment dwellers or those with a small space.

Z Scale (1:220)
     It was introduced in 1972 and is even smaller than N. It does not need much space. You could build a layout in an attache case or an enclosed coffee table. The major manufacturer is Marklin. The majority of the equipment is European flavor. However, Micro Trains offers an F7 locomotive and American style freight cars.

G Scale (1:22.5)
     We owe this scale to the German manufacturer Lehmann. Their popular brand of LGB trains are actually GN3 models running on No. 1 gauge track. They represent narrow gauge track. The letter G stands for garden. The G scale Aristo Craft Trains run on No. 1 gauge. They are proportioned at 1:29 and represent American prototypes. These rugged trains definitely are at home in the great outdoors.

Here is a brief explanation of the sizes.

Narrow gauge verses standard gauge:

The first transcontinental railroad in the US was built with the rails spaced 4' 8 ½" apart. This became the standard gauge for railroads. Before that, gauges ranged from 2 to 7 feet. Three feet was also a popular size used in the Colorado Rockies and Appalachians. It was cheaper to build and could negotiate tighter turns, which was useful in the mountains.

Gauge 1 Narrow Gauge:
The real narrow gauge equipment was about 3/4 the size of standard gauge. Hold on to that concept otherwise things can get a bit confusing from here.

You have two separate groups of models available that will run on gauge 1. Models that are replicas of real narrow gauge, (made by LGB, Bachman, Hartland and Aristo Craft). The other group are models based on standard gauge real railroads and equipment (from Aristo Craft, LGB, USA Trains, Lionel and MDC). Most of these brands make both narrow and standard gauge.