I am trying to connect my guitar to my pc to record it without an audio interface. I tried connecting the guitar to the amp, and then using a 3,5mm jack plug from the headset exit into my pc's microphone input. When I tried to record, I could actually hear the guitar but there was a weird background noise which was also changing my guitar's sound somehow. Any advice on how I should do this?
What you're seeing is what usually happens when you plug a headphone output into a microphone input: the impedances and signal levels are all wrong. You'll need an adapter which can handle it. They do exist, and can be had from some major musical hardware and PA web retailers, but not every one will work with your particular equipment, you may need to be prepared to return one and get another. It might be best to contact a major pro audio company and get their recommend, that will give you a higher likelihood of success the first or second time.
The only references I can give are web retail examples of specific products, which are not allowed here as I understand it; if I should, admins, please do let me know and I will. General Google searches are quite confusing, because many products omit the circuitry and just make the mechanical ends fit.