They may have no difference in the USA, but despite the beliefs of some of their citizens, the USA is not the whole world...
A lawyer is a collective term for anyone who is a law professional. All Barristers and Solicitors are lawyers.
A barrister is a lawyer that represents someone in court.
A solicitor is a lawyer that does non-court based law, such as conveyancing, writing wills, deeds, company formation, etc.
A person typically hires a solicitor, and if it is then necessary for the person to be represented in court, the solicitor will arrange for a barrister to do that representation.
Historically in the British justice system, which is used in most English speaking countries, a lawyer could not be both a solicitor and a barrister. Some (most?) countries have relaxed that restriction, although many lawyers still tend to practise either one or the other.