For most punctures, you don't need to take off the wheel. With the bike upside down, just lift off the tyre off on one side, pull out the tube and then you can fix the puncture. To change the tyre, pull the first side of the tyre off on the opposite side to the wire, then pull the other side off on the same side. With the tyre off the rim, undo the axle nuts and lift the wheel just clear of the drop-outs, you can then lift the tyre over the axle to get it clear, while the wheel is still attached by the wire.
If you're lucky, there will be a connector about a foot from the axle, sometimes hidden behind the chainstay. If there's no connector there and you need to completely remove the wheel from the bike, follow the wire from the motor to the controller, cutting any cable-ties as you go. There will definitely be a connector at the controller end of the wire.
Never cut the wire and don't let any ham-fisted bike shops cut the wire either. It's very difficult to repair. I've heard of this happening loads of times, so be warned!