In the United States there is no difference at all. "Attorney" is simply a more polite, formal, and respectful word; "lawyer" is the everyday word. It is much like the difference between "physician" and "doctor."
Formal government officials are called "attorneys" because it is the more formal term. Thus, Jeff Sessions has the offical title of "Attorney General of the United States," not "Lawyer General."