I take it when you say layering you mean building up a song using muti tracks.

Gone are the days when most songs were recorded as live performances. Nowadays each instrument is recorded seperately on a multitrack recorder (Colin has given you some useful tips) the various tracks are edited and combined to form the MASTER.

The song is built up adding a track at a time. Most people use a click track to get the timing right. A click track is like a metronome it just clicks out the tempo....click click click clunk click click click clunk etc etc. This is played during recording and removed later to let the musician hear the beats so he plays in time.
Each instrument is then recorded one a time and allocated to a different track on the multi track recorder. If mistakes are made it is easy to re-record that bit and "punch in" another recording covering the mistake. Most times a few recordings usually three of the same parts are made and the best bits used.

EG
track 1. piano
track 2. lead vocal
track 3. guitar
track 5. bass
track 6-9 vocal harmonies
track 10. horns

You can add or remove tracks anytime. Each track although part of the song can be independantly edited, balanced and EQed, have FX added, muted, moved or cut and diced to fit different parts etc etc. It is a very complicated and interesting process.

In theory one person can record a whole song singing and playing all the parts and instruments. The sky is the limit if you have the talent time and money to do it.

Why record a demo? Well it is a way of showing how your song can sound given the "treatment" rather than just showing lyrics and a melody.
Most producers want to hear the finished article (how it will sound on the radio) before they will commit to having someone record it so DEMOS are now as much a part of the business as writing lyrics and tunes. Most songwriters who are serious about their songs want to produce a good quality demo even for their own uses that is the best it can be.....given their experience and time and money restraints. Yes it can be done in your own living room with one cheap mic and a PC but most serious people have a studio that they use or in some cases have created their own studio.