When I try to record over another audio track, the sound of that audio track comes to my recording. I want to know why does this happen.
You’re trying to overdub, right, adding voices and music one after the other?
This happens when you told Audacity to record Stereo Mix (everything playing on the computer) instead of a particular microphone or device. It’s a common error because of the popularity of recording YouTube tracks and on-line productions. That setting tends to get stuck.
Set this in the Audacity Device Toolbar.
Also, in the Audacity settings, de-select Playthrough.
Audacity > Edit < Preferences > Recording: [_] Playthrough (deselect)