If, hypothetically, you were to turn your car’s ignition cylinder to the off position and remove the key, then your car’s engine would immediately shut off. Of course, thanks to the laws of physics and whatnot, all that kinetic energy from your car’s ongoing movement wouldn’t just immediately vanish and stop you dead.
When the engine is turned off, it stops taking fuel from the intake, but any fuel already in there keeps the pistons pumping for a bit longer, pushing the car forward until the pistons stop. Additionally, your car’s engine or battery doesn’t power your steering wheel and brakes, so they would still maintain at least partial control. Basically, if you turn the car off while driving, it’ll stop being a car and start being a wagon.
Incidentally, if your car has a wireless fob that, through some random happenstance, leaves the car’s confines, it wouldn’t actually affect anything. Most cars that utilize this kind of system have failsafes built-in that keep the car running normally even if the fob goes too far away or if the stop button is pressed. Once you turn the car off, you would need the fob to turn it back on, but that’s a separate concern.