My computer kept switching all the time when ever I was playing a game. So I had alook in my computer and a wire I bought to extend the CPU wire. The extended wire had burnt so bad that the wire was showing out of the insulting. Will this effect my computer in any way because it was working fine and I shut it down before I took the wire out does it matter that my psu only has a 4 pin for CPU and my motherboard has a 8pin?
It is possible that the wire extension is of poor quality or the wrong gauge. Unless the wire touched something inside the case you are probably ok. It is usually not a big deal if you only have 4 pin PSU and an 8 pin motherboard unless you are running a huge amount of watts through your board. Of course if you are running a couple of GPU's then you might consider getting a better PSU with an 8 pin.
Could fry components if it gets out of hand?
Buy a replacement cable. This has probably happened because one of the connectors is loose which would cause it to get hot because it has a lot of power flowing through it. Hopefully it hasn't damaged the pins on the motherboard with the heat, I've seen motherboards wrecked that way.
Rule #1, never add extension wires to any PSU to motherboard... If the wire does not fit, get a different case or different PSU... If the PSU is still working, you should be ok. Just get a proper cable to the motherboard (and/or change PSU). Melted wires are an indication of too much current in the wire for a given wire size. In plain words, the wires were too small for the load they carried. Since your mobo has an 8 pin CPU power socket, you MUST get a PSU that has the same 8 pin. In general, 8 pin can carry twice the current that 4 pin can, hence that is why your wires burned, you were putting too much current through the 4 wire, current that needed the 8 wire plug... A 4 wire will not work - ever, it will still overheat.... Get the right power supply !!!