As usual, a picture is worth a thousand words. Here are some cross sections of some commercial jet engines (GE90 and PW4000).
http://adg.stanford.edu/aa241/propulsion/largefan.html
Both are twin-spool engines. In the GE90 series engine cross-section, which is numbered, you'll notice that the fan (1), compressors (2 for low pressure and 3 for high pressure), combustion chamber (4), high pressure turbine (5), and low pressure turbine(6).
The Fan(1), low pressure compressor (2) and low pressure turbine (6) all rotate on the same shaft, at the same speed. The fan and low pressure compressor are driven by the low pressure turbine.
The high pressure compressor (3) is driven by the high pressure turbine (5), on a second shaft, or spool (hence, twin spool). This allows the fan and low pressure compressor to be spun at its optimum speed, while the high pressure compressor can spin at its optimum speed (which is much higher, as it's trying to squeeze those molecules ever and ever closer). So having the "low pressure system" (fan, low pressure compressor, low pressure turbine) and the "high pressure system" (high pressure compressor and high pressure turbine) spin separately, they can optimize the speeds so both perform at their most efficient.
Rolls-Royce often brings it a step further, creating 3-spool engines. The first spool is the fan, driven by the low pressure turbine; the second stage is the Low pressure compressor, driven by the "Intermediate pressure turbine", and the 3rd stage is the high pressure compressor, driven by the high pressure turbine. It allows even more optimization of the rotational speeds of each component, but introduces more mechanical complexity.