The word is Latin but it has its origins in Greek theater. A Greek diety would be hoisted on stage with a mechane where a scene called for the diety to be in flight.
The deus ex machina, or "god from a machine" is a hack literary trick where the problems of a plot are resolved at the end of the story by the sudden introduction of a new element.
Yes it is a plot device It is latin for "god out of machine".It is used when the problem/crisis of the story is solved abruptly.Example:A new character coming out of nowhere and ultimately resolving...
A simple example of the "Deus ex machina" motiv: In Sophocles' "Philoctetes", Philoctetes is about to hurt Ulysses and his son Neoptolemus, who came to the island of Lemnos, where Philoctetes was...