There are a few things that can cause a Miata to just stop. It's almost impossible to stop a Miata from cranking, though. That's a pretty fundamental ability.
Coils tend to go individually, which makes the car run like a tractor but won't kill it. Fuel, no spark on two cylinders (1-4 or 2-3).
A break in the wires at the cam angle sensor will kill 'em dead like this. If that's the case, no fuel, no spark.
Main relay. More typically, this is a "the car was running fine until I turned it off, now it won't fire" kind of failure. I haven't heard of one cutting out when the car was running. The main relay is in the fusebox under the hood, you might be able to see burned contacts if that's the problem. No fuel, no spark, no power on any white wires with red stripes.
Fuel pump failure is pretty obvious. No fuel, spark.
Timing belts tend to break when pulling away from a start or starting the car. The car might crank funny. Pull the oil fill cap and watch the exhaust cam as you crank. This one isn't common, but it can happen.
Square left in 50 caution ocean!