It really depends on the capabilities of your soundcard, you would generally need to use ASIO for your main music making App, and then in audacity you could try using wasapi or MME to see if you can record the software sound, sometimes called 'What you hear.' It must be supported by the hardware in that scenario.
However it sounds as though you aren't using a DAW? If not that is the way forward as it's like a virtual recording studio and designed for what you describe, you would actually record a midi track of you playing the Virtual Instrument as opposed to recording the audio. If you don't have a DAW Reaper is probably a good start as the demo is fully functionally and doesn't expire, though you get a longer nag screen over time. It is very cheap to buy as well, about 50-60 dollars from memory I think. Then find some tutorials and start learning
Guitar band? maybe you mean garage band? In which case you need to find some garage band tutorials.