EDIT: corrected errors, added historical references and quotes from order.
Donnelly's order (https://assets.documentcloud.org/documents/3437021/Darweesh-v-Trump-Order-on-Emergency-Motion-for.pdf) is an "Emergency Motion for Stay of Removal".
Like any court order, it can only be reversed by a higher court, not by another district court.
The order only affects refugees who already in the United States (emphasis added, capitalization in original):
ENJOINED AND RESTRAINED from, in any manner or by any means, removing
individuals with refugee applications approved by U.S.
Citizenship and Immigration Services as part of the U.S. Refugee
Admissions Program, holders of valid immigrant and non-immigrant
visas, and other individuals from Iraq, Syria, Iran, Sudan, Libya,
Somalia, and Yemen legally authorized to enter the United States.
It doesn't say anything about preventing new refugees from entering the country, despite what some media reports have said. Perhaps as an oversight, it doesn't cover refugees in flight in airplanes that haven't yet landed in the United States either.
In Marbury vs Madison (https://en.wikipedia.org/wiki/Marbury_v._Madison), Marbury petitioned the Supreme Court directly, since it had original jurisdiction per the Judiciary Act of 1789 (https://en.wikipedia.org/wiki/Judiciary_Act_of_1789). However, the Supreme Court ruled that portion of the Judiciary Act unconstitutional, and thus denied Marbury's petition.
Although the President can't be tried for crimes except by the Senate (after the House brings him to trial), he can be sued for damages. Since he can't be sued in the Supreme Court, he must be sued in a court under the Federal judiciary of the United States (https://en.wikipedia.org/wiki/Federal_judiciary_of_the_United_States) which includes the District Courts.
Of course, the Supreme Court has appellate jurisdiction, as they do in all cases, except as prohibited by the 11th Amendment.
Judge Donnelly can issue a stay (i.e. a temporary stop to a legal proceeding) because she is a federal judge, and thus
have "federal question" jurisdiction, which means that federal courts
will hear cases that involve issues touching on the Constitution or
other federal laws. Source.
Donnelly's decision was based on likelihood of success, avoidance of irreparable harm, and lack of harm caused by granting the stay (emphasis added):
The petitioners have a strong likelihood of success in establishing that the removal of the petitioner and others similarly situated
violates their rights to Due Process and Equal Protection
guaranteed by the United States Constitution;
There is imminent danger that, absent the stay of removal, there will be substantial and irreparable injury to refugees,
visa-holders, and other individuals from nations subject to the
January 2 7, 2017 Executive Order;
- The issuance of the stay of removal will not injure the other parties interested in the proceeding;
Suppose Donnelly allowed the deportations, the refugees were killed after arriving back in their country, and a higher court then decided the deportation was illegal. At that point, there is nothing the higher court can do to repair the damage caused to those deported.
Conversely, allowing them to remain (detained inside an airport, not free to roam the country) has very little risk. If a higher court rules they should be deported, they can be at that time-- the delay in deportation causes no irreparable harm.
You could argue the detention itself is a form of harm, and that the refugees should be allowed to enter the USA proper, but courts have generally held that you can compensate people for illegal detention with money. In other words, detention is harm, but not irreparable harm, at least in this case.
Although there are two named petitioners, the petition includes "ot[h]ers similarly situated".
The US Marshals are responsible for enforcing the stay (capitalization in original):
IT IS FURTHER ORDERED that to assure compliance with the Court's order,
the Court directs service of this Order upon the United
States Marshal for the Eastern District of New York, and further
directs the United States Marshals Service to take those actions
deemed necessary to enforce the provisions and prohibitions set forth
in this Order.