Having an engine shutdown during the flight is an engine failure. An engine failure is one of the procedures where every pilot is trained to deal with because it is easy to simulate. Engine failure is an emergency, meaning that the pilots must land the aircraft as soon as possible.
Can't a jet engine be just restarted?
Maybe, maybe not. It depends on the diagnostics in the cockpit. You certainly do not want to restart a damaged engine. All jet engines are capable of being shut down and restarted in flight, provided that nothing is broken and proper procedures are followed.
Now, of course, if everything was working then the engine would not have shut down in the first place. It is an event which pilots are prepared for, but it should not have occurred. When it does, that means something is wrong. The decision of whether to attempt a restart is evaluated by the flight crew based on engine data, distance to nearest airport, weather, and possibly a discussion with ground support. In short, it is a risk management exercise.
Why are in flight shutdowns so critical?
With one engine shut down, your chances of making it to the destination are virtually none. Aircraft performance is calculated assuming that all engines are working. With one engine shut down, the amount of thrust is reduced and the aircraft must descend to a lower altitude. At lower altitude, fuel consumption is higher, therefore you will not have enough fuel to reach your destination and you need to land somewhere closer.
Furthermore, you are now running on your last good engine. If that engine fails as well, the airplane will become a glider. ETOPS is designed so that an aircraft may limp to the nearest airport in no more than X minutes, and the presumption of ETOPS is that the engine failure rate is low enough. In other words, the aircraft failed to meet its certification standards.