What have you got to edit with?
Wavelab, Soundforge, Logic etc.?
Record the song as a Wav. mp3, aac, etc. file (compatible with your editor), or just rip it from cd, and save as desired format.
Load the file into the audio editor so you get the waveform display. Find the 1st beat, or the start ot the loop and zoom right in so the waveform is visable as a single line. Where this crosses the zero line, mark, or just click on. zoom back (leaving the cursor on the 1st beat) out and play through to the end of the bar, e.g where you want to loop to end. Zoom in to this, and find where it crosses the zero line (as like before). This point will generally be
just before the next beat kicks in, typically a bass drum hit.
Now you have the boundaries of your loop marked. If you were to play this loop it would now loop over and over, e.g if it was a 1 bar drum loop it would play over and over perfectly in time.
So now you can either drag the cursor over the wave, from mark in to mark out of the loop, right click>cut and open a new wave window and paste, or just delete everything out with the loop in the original window.
Once the loop is cut, either keep pasting it on the back of the original loop, for as many times as required to have for example a 3minute song consisting on the same loop playing over and over.
Or
Enter it into a audio sequencer, synch the bpm and insert the loop back to back on 1 of the audio tracks right through. This is better for adding effects and fades etc.
Hope that helps, could have been more clear, but my head's not working well due to an evil hangover.
The audio editor Viope pointed out should work grand.
Here's some more:
http://www.harmony-central.com/Software/Windows/audio_editing.html
Audacity is a way cut down version of Soundfoge, so these notes
might help:
http://www.rice.edu/fondren/dmc/howto/forge/index.html