I have "Marshall MG10CF" with a headset output.
Can i somehow connect it to my pc as a microphone and record guitar?
You do not want to connect as a mic, as the output to a headset will be too high a level. Instead, you want to use a line-in input if your pc has one, or if not, use an external audio interface to connect.
USB audio interfaces can be very cheap.