The attorney general is the chief legal officer and law enforcement officer of a state, commonwealth, possession, or territory of the United States.
The AG is the only lawyer in the office with federal jurisdiction over criminal offenses (federal crimes). There are several specific areas that an AG would typically spend their time on, like white-collar crime, illegal immigration, and scams that target seniors. They also serve as both attorneys-in-fact and state's attorneys over any active AG investigations, which could be federal or state nature. They also provide legal advice to the government and may represent the government in court.