Many laptop cords are standardized. Where there is no external power supply, they often just need a stock AC cord such as this.
If it is three prong, it may be like this.
If it is damaged, replace it. It is cheap, available at many locations and safe. Do not repair except as an emergency measure.
However, many laptops have an AC cord (the cord that plugs into the wall) that also plugs in on the other end to a power supply (a small plastic brick). The AC wire almost always can be disconnected from the unit and the same replacement technique applies.
The AC cord is on the left, the power supply and its cord on the right.
If the AC cord is damaged, replace the cord.
If the other wire attached to this unit (the wire that goes to the computer rather than the wall) is damaged, this is much more problematic. These wires are almost always not detachable from the power supply, and they are usually proprietary (non-standard connectors). If the damage is very minor, you may be able to get away with shrink tubing, if it fits over the connector (sounds doubtful), or plastic electrical tape (always a bit sketchy on a wire that flexes). This is a low voltage wire, but it still is problematic. You may need to get a replacement power supply from the manufacturer or a third party supplier.
On the other cords, there are two types of replacement plugs, screw on and piercing.
Pierce seems easier, but screw on seems more reliable. They are also available in polarized and three prong versions. Cut the wire above the bad section and bring your old plug to match.