State Government
(1) The Governor appoints a person qualified to be a High Court Judge as Advocate-General for the State. (2) The Advocate-General advises the state government on legal matters and performs other legal duties as assigned, and discharges functions the Constitution or law confers. (3) The Advocate-General holds office during the Governor's pleasure and receives remuneration the Governor determines.
This is the state-level equivalent of the Union's Attorney-General (Article 76) - the Advocate-General is the state government's chief legal adviser, appointed by the Governor from among people qualified to be High Court judges.
When a state government needs to defend a state law's constitutionality before the High Court, it is typically the Advocate-General who represents the state's legal position in court.