What is the difference between a lawyer and an attorney?

I often use 'lawyer' and 'attorney' interchangeably when discussing legal matters with my attorneys, but I’m not sure if that’s correct.