Going direct to the soundcard will work but not the best quality, If you go that route, well no mater which way you go, you'll need a recording program (DAW) like reaper (free for a while) or audacity (free). Then you'll need to install ASIO4All which is a sound card driver that will reduce the latency (delay) going into your computer.
A better route would be to buy a recording interface, for your purposes an interface with 2 ins would probably do fine. They also usually have mic pre amps built in as well as phantom power if you ever get a high end mic. Quite often these interfaces also come with a stripped down version of a DAW like Cubase which would be more than capable of handling your needs.
What kind of mic?
What are you using for backing tracks?
What's yor budget?
Is it a laptop or desktop? Do you have firewire?