If the motor keeps running and won't stop, check whether the throttle is stuck fully open or jammed by something so it can't return, and try squeezing and releasing the brake lever. If the problem remains, replace the throttle.
Next check the throttle-to-controller cable for breaks, wear or bent pins and replace the throttle cable if you find any. Then inspect the motor-to-controller cable for broken wires, worn insulation, bent pins, loose connections or an off-center arrow, and replace the motor if you find any. If the motor still won't stop, replace the controller.