• Habeas Corpus Writ
This writ cannot be issued in cases where a person was ordered to be arrested by a competent court and such order passed by a court is neither as prima facie illegal nor out of the jurisdiction.
But in cases where under judicial custody or police custody a person (that is under trial prisoners or any convict) who suffers maltreatment can file a writ petition or write a letter to the Supreme court or High Court regarding the same.
Reference case: Sunil Batra v. Delhi Administration(1980) - The Supreme Court held that if a convict is undergoing maltreatment or inhumane behaviour by detaining authorities inside the prison then in such cases a writ of habeas corpus shall be issued.
• Writ of Mandamus
A writ of mandamus cannot be issued against a public or a government servant who is not required to perform the duty under the law.
Reference case: Suganmal v. The State of Madhya Pradesh (1965) - In this case, the Supreme Court held that a writ of mandamus cannot be issued to tax authorities because there was no rule of refund of levied tax also as per the court order the assessment order was set aside. Hence, the court rejected to issue a writ of mandamus to tax authorities instead directed the petitioner to file a suit to claim a refund.
• Writ of Certiorari and Prohibition
A writ of certiorari is issued by the higher courts to subordinate courts or lower courts. In that case, a high court being lower than Supreme Court accordingly a writ can be issued to a high court by the Supreme Court of India if it has acted beyond its powers or committed an error of law.
Even a writ of prohibition is issued by a higher court to the lower or subordinate courts or tribunals to prohibit them to go beyond their authority. It can be issued by the Supreme Court to any High Court if it acts beyond its jurisdiction or violates the principles of natural justice or fundamental rights.