Hm, if I remember correctly, Audacity can only record from one specific source at a time. So, theoretically, if you have it set to record from whatever line or aux-in you are using, it shouldn't pick up the sound of the other track (It's coming from a different source, technically). I've done multiple tracks in Audacity and haven't had this problem, although that's not to say you shouldn't follow any of the above advice.
I'm curious to hear the problem in-action. Are you using the guitar line as a reference while you sing, in headphones perhaps? It's possible that if you're blasting the volume in your phones too loud (depending on if they are cheap or high quality ones), the noise from that could be bleeding out, being picked up slightly by your vocal mic.