Good advice from Steen.
Let me just add, though, that there is something called "scratch tracks". For example, if you do drums first, you have to sing the song in your head while playing the drums all the way through. Nothing wrong with that if you can do it. But you might be more comfortable drumming along to a scratch on the guitar. This scratch track is just a guide to follow while you're playing drums.
In a case like this, the guitar was recorded first, but then discarded after the drums were recorded (or you can leave the scratch while you record bass, etc...). Eventaully, you'd replace the guitar scratch track with the real guitar track.