Union Government
(1) The President shall appoint a person who is qualified to be appointed a Judge of the Supreme Court to be Attorney-General for India. (2) It shall be the duty of the Attorney-General to give advice to the Government of India upon legal matters, and to perform such other duties of a legal character as may be referred or assigned to him, and to discharge functions conferred on him by the Constitution or any law. (3) The Attorney-General shall have right of audience in all courts in India. (4) The Attorney-General holds office during the pleasure of the President and receives remuneration as the President determines.
The Attorney-General is India's top law officer - the government's chief legal adviser, appointed by the President from among people qualified to be Supreme Court judges. The Attorney-General can appear and argue in any court in the country on the government's behalf.
When the Union government needs to defend the constitutionality of a law before the Supreme Court, it is typically the Attorney-General (or the Solicitor-General, a separate statutory post assisting the AG) who represents the government's position in court.