The terms "lawyer" and "attorney" are usually used interchangeably, but they are technically different. A lawyer is someone who graduated from law school and can give legal advice but may or may not have passed the bar exam.
An attorney is a person who passed the bar exam and is now qualified to represent clients in court. All attorneys are lawyers, but not all lawyers are attorneys.