An electric motor works because of a curious tendency of electricity running through wires: the live wire creates a circular magnetic field which, when amplified with the presence of hundreds of wires, is what reacts to the motor's magnets to make the armature spin. Sometimes, however, the motor burns out and the coil of field-producing wire, or field coil wire, needs to be rewound around the armature. It is a slow process which calls for a lot of repetitive coiling.
Disconnect the motor from any power source and remove it from your model or device.
Detach the motor housing carefully, taking care not to damage or lose any screws or connections. You need to remove the armature from the device, so that you can work on it. The armature is the device attached to the motor gear, which spins freely. When removing the housing, it will be recognisable because it's covered in a tightly coiled wire. Take note of the way the wires are coiled around the device and where its wires are connected as you remove it from the motor. Everything will need reconnect the way it was.
Pull the wires off of the armature while spinning the armature to uncoil it. You will likely notice a burnt wire while taking the wires apart. While removing the wire, get a sense for how the wires were coiled originally. Remove all of the wire from the armature.
Place a small drop of super glue on the armature, at the point where the old wire started, not where the burn began or ended. Stick the end of your magnet wire onto the drop of glue.
Wind the remaining magnet wire around the armature, in the same way the wire was originally coiled, ignoring the burnt section. You need to pull tightly and evenly around the device. The coils need to be very tight for the motor to perform as with the original wire. Wind the wire until your armature is wound like the original piece had been.
Rebuild your motor in the reverse manner of how you dismantled it. Verify that the coil wires connect to the points where they were originally connected on the device. Reconnect the motor to power and test it. If the motor does not spin, you need to re-coil the wires, likely more tightly.