India is a "Union of States". "Government" in India consists of two tiers: State and the Union (also called the Central Government).
If a state government does not follow court orders, contempt of the court case can be filed, for example: here.
That means, the court now has powers to direct central agencies, who are outside the jurisdiction of the state government, to conduct investigation into the matter and arrest state government officials. As per the constitution, the central government can then use this as a basis to impose President's rule in the state, leading to fresh elections.
However, if the centre is unwilling to carry out action against the state, or when it is the central government that is responsible for non-compliance - the courts are effectively powerless - since all law enforcement agencies are controlled by some part of the government. This has been highlighted by the courts many times, even by the Chief Justice of India. Recent examples are:
- Allowing the Executive to act in violation of court orders will be “an invitation to anarchy”, the Supreme Court held [Dec 9, 2020]
- Executive’s tendency to ignore court orders [ is ] a worry [CJI of India, Dec 2021]
- Governments ignoring court orders, says CJI [April 2022]
While most of the non-compliance happens in trivial cases, in non-trivial ones, it could potentially lead to constitutional crisis. Since the Parliament is effectively all-powerful, they could do anything - from
making a law that essentially renders the court judgement invalid, to impeaching the judges or application of a National Emergency.
However it is in interest of democracy that the real power lies with an "elected" government, not a bureaucratic
institution like the courts.