Is this a pinch-type connector, or did the wires break off? This will determine how to fix the problem.
For pinch-type connectors, you need to push the wires carefully into the connector with a small screw driver. Once the wires are in there, put some CA glue to hold them in place.
If this is a soldered type connection, you need to clean up the wires and old solder first.
For this you will need to get some solder wick to clean up the connector where the wires were attached to and a pair of wire strippers for small wires. Strip the ends to show the copper or tinned (silver-colored) wire underneath. You don't need much - perhaps a 1/4-inch max. Once the wires are stripped, heat them up and dab some solder on them. They will wick up the solder and "tin" so they can be attached easier.
Use the solder wick to such up any solder on the connectors. This has to be done carefully so you don't drop any solder bits into the motor or other electronics. Once the old solder is removed, you can then resolder the wires to the connector. Be careful not to melt any wires or plastic, and make sure you don't drop any solder into the motor or on other electronics otherwise your engine will be hosed.
John