
literally, “god from the machine.”
Refers to the practice in Greek drama to resolve plot issues by lowering an actor dressed as a god on a rope with a winch, and having the god character use their magical powers to resolve the story.
Deus Ex Machina refers to the screenwriting technique of having something conveniently come along to solve story problems. The solution is usually unmotivated, convenient and inorganic.