The legal profession has a rich history rooted in the English justice system. Over the years, the terminology has become modified and the meanings have been muddled.
A lesson on the courtroom
Court rooms were made up of three sections. The first section was reserved for the legal bench where the judge sat. The third section was reserved for the common folk who came to observe the proceedings. In the middle section was where people with familiarity of the law could stand. They would be separate from the commoners and could address the judge. These three sections were separated by two rails, known as "bars," from which we get the terminology of a barrister or that a lawyer is called to the bar.
For most people, the subtle differences in names of those in the legal profession do not matter, but is important to note that a barrister was originally not an attorney, although many people will refer to them as that today.
And the other guys
Aside from barristers, historically the other legal professional was a solicitor. The solicitor is the one who was an attorney. Barristers could represent a client in court but attorneys could appear in the place of a client.
Add to that the words "lawyer," "counsel," and "legal adviser," and you get a mishmash of terms that has come to mean a legal professional.
If you find yourself in legal trouble or are involved in a lawsuit, you'll probably not care where the term attorney came from. However, it is interesting to note the roots of our system that stemmed from tradition.
You will probably find lawyers, barristers, solicitors, and attorneys in the yellow pages all under the term