aircraft work a bit different when it comes to alarms and advice. There is indeed an alarm and an indication of an engine failure. You would notice that the indicators of the respective engine, like Exhaust Gas Temperature (EGT), N1 Thrust and N2 Thrust will all drop. You will also get an EICARS warning (or several), that lead to the conclusion, that indeed an engine has failed. There is yet another indication if there is an engine fire. Along with an alarm the engine fire extinguisher handle will light up.
However, there is no indication as of whether the engine has just failed or flamed out or separated. At least not from an instrument point of view. A good pilot however will at least suspect that an engine separation has occurred. For example, if an engine is failing, its indicators are going down slowly. N1, N2, fuel flow, everything is going down slowly until it reaches zero. An engine separation will also lead to a fuel leak, since the fuel will spill out of the pylon. Maybe there also have been engine issues before, like overheating, that led to the failure. On the other hand, if an engine separates, all indicators will go to zero pretty much right way. As all sensors are gone. Usually a missing engine will also change flight behavior. Another way to find out would be the cabin crew or a passenger telling the flight crew. Of course this does only work with wing mounted engines. Aircraft like the Boeing 717, which have tail mounted engines make it impossible for anyone in the cockpit or cabin to notice a separation. In addition, it helps to know what happened before... maybe a sound of an explosion, touching something with the wing, etc. would also lead a pilot to think that an engine could have been separated.
So to summarize: There is an alarm for engine failure and engine fire but there is no alarm for an engine separation. It will just be an engine failure alert. However, there are indications and signs which a good pilot will recognize to at least suspect the separation.
when an engine falls off an airplane
—or do you mean an alerting system for an engine power failure? $\endgroup$