Another resource: http://simple.wikipedia.org/wiki/Virtual_memory
Put simply, swapping (the precise term is "paging") is a method used to optimize RAM. In a computer, RAM memory is usually a limited resource in regards to what users demand. Take for example a common combination of programs in a session: operating system + system services + graphical environment + browser with many tabs + office suite + instant messenger + media player. These alone would normally "eat up" almost, if not all available RAM in the system.
Operating systems get around this limitation by sparing space for "simulating" extra RAM. Because of this, "swap space" is frequently termed as "virtual memory". The extra space is spared usually in your next common place to store things, that is, your hard disk.
The simulation basically works by tracking (several ways exist to do this tracking) how your RAM is used. RAM that is currently "less used" is marked as such, and eventually gets copied to the reserved disk space, freeing that area of RAM for things that could need it more. Whenever the area that was copied to disk is needed again, it will be copied back to RAM, perhaps forcing the previous process to be applied to some other RAM area. This exactly is why the process is called "swapping".
This is all done transparently by the Memory Manager of an Operating System, a core component of the kernel. The programs running always see their virtual RAM as real RAM, and don't care if it's swapped or not.
This way you are allowed to use much more RAM than you really have, but at the cost of getting too much swapping if you abuse of it. In that case you'll see a lot of disk activity and the system will slow to a crawl (because obviously, reading and writing to hard disk is WAY much slower than RAM). To get back to normal, just close some programs and documents.