The machine runs on its own
Take your foot off the pedal. If the needle is still moving, pull the plug from the wall socket. Do not reach into the needle area while it is connected. A pedal that stays pressed because something is standing on it can do this. Move that, and only then plug in again, with nothing touching the pedal, and see if it stays still. If the lead is crushed, do not plug it in to test. This varies by machine. The manual for the model in front of you is the authority. Some machines have a start button as well as a pedal. The manual shows it. If the button is not the cause, and the machine still runs with the pedal free, leave it unplugged. Do not open the pedal, do not join the wires, and do not tape the pedal down to test it. The will-not-start page is a machine that stays silent. This page is a machine that will not stop.
Tell a mechanic whether it ran the moment it was plugged in, or only after the pedal had been used.
A hot smell or a tingle means the plug stays out.