Determine which method is the most practical for your recording needs. If you're a hobbyist, there's no need to spend thousands on a professional recording setup. If you just want to have some fun, invest in an inexpensive portable 4-track music recorder or recording software with an interface that allows you to connect a real microphone. All of this can be found at www.musiciansfriend.com, www.americanmusical.com or your local music store.
Read the instructions included with your specific recording interface to learn the basic functions (track selection, record, rewind, fast-forward, play). If you plan to get serious about recording, spend time studying your user guide to get familiar with some of the more advanced features.
Record your accompaniment on an individual track on your studio software or multitrack recorder. Connect whatever medium of playback you use (CD player, computer) to your recording interface using the proper cable.
Connect your microphone and/or solo instrument to your recording interface or standalone multitrack recorder.
Connect headphones to your recording interface or multitrack recorder's output. Don't play the music you plan to sing or play along with through speakers because your microphone will pick up the output from the speakers. This will create an undesirable echo effect. If you want to add echo to your vocals or background music, consult your user manual for instructions on adding "reverb" to the recorded tracks. Reverb is an adjustable echo effect that can add fullness to your live or recorded music.
Rewind all tracks on your recording software or multitrack recorder.
Record your vocals or solo instrument on a separate track as the previously recorded background music plays through your headphones.
Rewind all of the tracks and play them back simultaneously to see if you are satisfied with your recording, rerecording as necessary.
Consult your user manual for instructions on "mastering" your tracks and recording them to CD or converting the piece to an MP3 file. The process will differ depending on your recording equipment.