You might have heard the words attorney and lawyer used interchangeably in TV or movies. So much so, that you might think that the words are synonyms, but in reality they're slightly different things!
A lawyer is someone who is trained in the law. Anyone who has been to law school can consider themselves a lawyer.
An attorney, however, is someone who has passed the bar exam in the jurisdiction that they intend to work in.
This means in practice, that someone who's strictly a lawyer can give legal advice, but only an attorney can legally represent someone else.