A writ of certiorari effectively quashes past conduct for which there was no jurisdiction, for example to quash a decision of a federal superior court. It lies against bodies or persons exercising public power.
It is in essence a two part remedy:
The first part removes the official record of the decision maker into the superior court issuing the writ of certiorari.
The second part is an order quashing the impugned decision and its record.
In some cases, the court may choose to grant an equitable remedy, such as an injunction or declaration, instead of a writ of certiorari. See for example Heli-Aust Pty Ltd v Cahill at [194]. In other cases, it will be necessary to formally quash a decision by writ of certiorari, such as a decision imposing a licence.