As long as the computer microphone can hear the guitar, you don't any hardware.
That said, if you want to plug your guitar into the computer microphone jack, you can. You just need the right adapter to go from the wide guitar cable to the thinner headphone jack.
If anyone is searching for this adapter, it is a 1/4" jack to 3mm (or 1/8") in common industry terms. I've got one, but don't expect to easily use it for much besides this app. Microphone input jacks on most PCs are not designed to amplify guitars or make their input sound good (in my experience). There are pre-amps for doing this kind of recording, though.
That said, if you want to plug your guitar into the computer microphone jack, you can. You just need the right adapter to go from the wide guitar cable to the thinner headphone jack.