There's no getting away from the fact that a good microphone costs a reasonable amount of money. For acoustic guitar and voice, a reasonable quality condenser microphone is what people recommend. $50 or so gets you a Behringer that'll do the job.
Professional mics have XLR connectors, and condenser mics need power - either from a battery or from phantom power on the lead. So you have two issues: one, connecting it to your sound card, two getting power to it.
You could use batteries, and get a simple unbalanced convertor lead to the 3.5mm mic socket on your sound card.
Or you could use a pre-amp, which will power your mic, bring the signal up to line level using (probably) better sounding circuitry than your sound card, and take proper advantage of the balanced XLR lead. Then connect the line-out of the pre-amp to your sound card.
More conveniently, you can get a nice external audio interface, with XLR inputs and built in pre-amp. These often have a compressor in as well, convenient knobs for adjusting levels, multiple inputs suitable for mics and instruments, and so on. It will also do a much better job of A/D and D/A conversion than your standard sound card, so it's a good investment. Also you can expect it to have good latency. I think it's the best way.
Alternatively, you could get a USB mic. You can think of these as being a mic, pre-amp and audio interface all in one unit. It's cheap and there's not much to go wrong. One consideration here is that you won't be able to use the mic for analogue purposes. That is, if you one day decide to gig, your USB mic won't be much use there.
Positioning the mic is important; but if you Google you'll find plenty of advice on that.
One further option is a pocket digital audio recorder. Many of these have a pair of stereo mics configured to record room audio. You can either use the device to record onto an SD card, then transfer your recording to your PC, or use the line-out from the device into your audio interface.
You can, of course, use the same kit to mic up an electric guitar amp, and that's how it always used to be done.
Nowadays we have amp modelling. That is, software that emulates an amp, cabinet, effects, room reverb etc. So if you choose, you can record the dry output of your instrument and have all the rest done in the digital domain.
Purists say they prefer real tube amps and real speakers, but you're asking for a budget solution, and I would argue that budget amp modelling sounds better than a budget amp.
The advice about sound cards above still stands. You can get reasonable results using an ordinary sound card. You can get better results with an external musician-oriented audio interface. It's also more satisfactory dealing with 1/4" jacks and XLR leads, than fiddling with little 3.5mm jacks.
Your big choice is between having your PC do the amp modelling, or doing it externally.
PC amp modelling: using software such as AmpliTube, Guitar Rig, GarageBand. Just plug your instrument directly into the audio interface, and let the software make it sound nice. One disadvantage is that it can work your computer pretty hard, and add latency. One advantage is that it lets you record the dry signal, and change effects and amp settings on a recording you've already made.
External amp modelling: using a stomp box containing amp modelling, or something like AmpliTube for iPad, connect the amp to the modeller's input, and the modeller's line-out to your audio interface.