A writ petition can be filed under Article 226 of the Constitution before a High Court or under Article 32 of the Constitution before the Supreme Court.
A Writ Petition can be filed to compel any entity that comes within the definition of State under Article 12 of the Constitution to do or to refrain from doing a certain Act. While one can approach the High Court under Article 226 for the violation of any legal right, there must necessarily be violation of fundamental right/s to warrant approaching the Supreme Court under Article 32.
Writs are extraordinary legal remedies offered to individuals who are either not provided under ordinary laws, or if the ordinary laws do not afford adequate protection to these individuals. Articles 32 and 226 of the Constitution of India empower individuals whose rights have been violated to seek legal cover through writs. Article 226 supports the enforcement of any right, including a fundamental right, directly at the level of the High Court.