There are many ways of recording instruments in a song separately, so no doubt others will add their ideas.
Are you playing all the instruments yourself or do you intend others to play?
One way is this . . .
1 Work out the structure of the song beforehand. Set up a click track at the right tempo. Perhaps you can create a basic drum loop to do this.
2 Record a guide track with, say, a rough vocal and guitar in time to the click track
3 Arm another track, play back the guide tracks, and play the next instrument along to these and record this
4 Repeat until all required instruments have been recorded, each on their separate tracks.