Consider a simple DC motor with brushes and a permanent magnet stator.
If you simply turn it, it generates electricity, but when it's not turning, it doesn't.
If you apply power to it, like you connect a battery, the current in the armature creates a magnetic field that interacts with the stator's field, creating torque.
If the motor is frozen so it cannot turn, that torque can be quite strong.
If the motor is allowed to turn, remember that it functions as a generator, pushing current back in the opposite direction to the battery's flow, so less current is flowing.
If it turns fast enough, no current will flow, but it won't get up to that speed by itself.
If somebody makes it turn even faster (i.e. negative torque), it can even charge the battery!
So that kind of motor gets maximum torque when it is stopped, and the torque falls off as it speeds up.
An internal combustion engine, on the other hand, only generates torque when the piston is on the power stroke, because it is being pushed by the expanding combustion gas.
It can't get that combustion unless it also exhausts the old gas, brings in new air and fuel, and compresses it. If it's not turning, it can't really do those things.
It is possible for an internal combustion engine to accidentally start from a complete stop, if the piston happens to be in just the right part of its cycle and ignition happens to occur.
This is a serious hazard in airplanes with that kind of engine, if the magneto happens to not be turned off, and somebody jiggles the propeller.
Some kinds of internal combustion engines generate more torque at low rpm than others.
You can learn more about that elsewhere.