A writ petition is a request to a High Court or the Supreme Court to enforce a fundamental right or to direct a public authority to act, or refrain from acting, in a particular way. It can be filed when there is a violation of fundamental rights or where a statutory or public duty has not been performed.
Both the High Courts, under Article 226 of the Constitution, and the Supreme Court, under Article 32, have the power to issue writs. A petition is generally filed in the High Court having territorial jurisdiction over the cause of action, unless the matter is taken directly to the Supreme Court.
Habeas corpus is used to secure the release of a person who has been illegally detained. Mandamus directs a public authority to perform a legal duty it has failed to carry out. Both are among the five writs a constitutional court can issue.
Yes, a government order or administrative action can be challenged through a writ petition if it is arbitrary, violates fundamental rights, or exceeds the authority's legal powers, subject to the court's discretion on whether to entertain the petition.