A mic socket isn't going to work for a a guitar. You need an audio interface that has a guitar input or something you can plug a guitar into that has a line out socket. But it is still going to sound poor using a pc mic input.
Only if either, you have a MIDI guitar, or you are hoping to be able to record from a MIDI source?
Your "ideal" solution here is an Audio Interface which includes facilities for both instrument and mic inputs (because they have very different signal levels and impedance demands), feeding to your computer via USB. Such an interface might also offer a MIDI input facility.
Your computer's built-in mic input is best avoided, at all costs.