This type of damage is usually caused by poor wiring terminations or poor contact between the pin of the plug and the female contact inside the socket. If you ever replace a burned socket always replace the plugs that are usually used in it and vice versa, if you ever get a burned or melted plug also replace the socket it was plugged into.

If there's damage to the installation wiring in the back of the socket where the insulation has melted, gone brittle or retreated up the wires or even gone crispy and fallen off then it will need a sparky to repair. Repairing would usually involve removing the damaged section completely if there's sufficient spare or resleeving with a couple of layers of heat shrink or extending withing ferrules if necessary.