A good quality rope can be expensive, and indispensable. If you are hiking, tying down farm equipment, or navigating on a one man sail boat you have to deal with ropes. Fixing a good rope, even if it is badly frayed, means you don't have to buy a new one.
First of all, determine whether or not your rope is synthetic.
Trim off the ends if it is excessively frayed with scissors. If the length of the rope really isn't an issue, feel free to trim off all of the ends. For as much length as possible, leave an eighth of an inch of frayed ends for fusing. Using a knife to cut the ends off can be dangerous. If you do, fold the rope in half and place the blade end of the knife against the frays and press outward away from your body. Don't point the knife toward anyone near by. Never cut toward yourself because the rope will cut and the knife can break free with a lot of force, possibly causing injury.
Hold the end of the nylon rope about three inches away from the tip. Hold it horizontally over the ground away from your body. Light the end of the rope briefly with a lighter. Wait only long enough for the end of the rope to fuse. If you burn it too long, or have too many frayed ends, you will end up with a large inconvenient bump on the rope. Be careful; melted synthetic material can cause painful burns.
Allow the rope to cool.
If you have a hemp rope you can use duct tape to wrap up the end of the rope. Some small natural fiber ropes can be dipped in shellac to keep it from fraying.
Ropes should be melted outside, away from anything flammable. Take care not to burned yourself.