They are used interchangeably for the most part but there is differences
Lawyer:
This is a general term for anyone who has obtained a legal qualification and is licensed to practice law, including solicitors and barristers.
Solicitor:
A solicitor is a specific type of lawyer who traditionally handles most legal matters, such as providing legal advice, drafting documents, and representing clients in lower courts.
In the southern US, it has a dual meaning. A solicitor is the equivalent to a district attorney or prosecutor. It also is a salesman who can be shot for trespassing on your castle grounds.