While the terms are used interchangeably, they really are not the same.
Actually a lawyer is anyone who graduates from Law school. You are a Lawyer when you get your JD.
However, an attorney is someone who is legally qualified to practice law , someone who has taken, passed the bar and is licensed to practice law.