The wire can be repaired, but likely another cause created the burnt wire in the first place, so replacing the wire may just result in another burnt wire.
If you are unfamiliar with auto electrical systems, you may want to get some professional help.
How are those wires attached to each other? That looks like a very sloppy connection, which could exhibit high resistance, leading to overheating. I'd recommend cutting back till both wires are clean, and then soldering or using an appropriately sized crimp connector.
If the wires are clean once you strip back the insulation, that's a good sign.
And, be very mindful of the caution from @DragonSubie7. Wires don't usually overheat by themselves (except in very sloppy situations, perhaps like this one). Watch how it goes once you re-establish the connection, and try to track down the cause if the heating continues.