Attorneys general are the top legal officers of their state or territory. They advise and represent their legislature and state agencies and act as the “People's Lawyer” for the citizens. Most are elected, though a few are appointed by the governor.
Merrick GarlandUnited States / Attorney generalMerrick Brian Garland is an American lawyer and jurist serving as the 86th United States attorney general since March 2021. He served as a circuit judge of the U.S. Court of Appeals for the District of Columbia Circuit from 1997 to 2021. Wikipedia
the PresidentAttorney General is appointed by the President on the advice of the government. There are the following qualifications: He should be an Indian Citizen. He must have either completed 5 years in High Court of any Indian state as a judge or 10 years in High Court as an advocate.
In layman terms, Chief Justice is a Judge and Attorney General is a Lawyer, both have distinct roles to play. The Attorney General of India is the highest law officer of the country and he/she is the chief legal advisor to the GoI. He is responsible to assist the government in all its legal matters.