In the UK, the legal profession is divided into two kinds of lawyers: solicitors, who generally advise clients and prepare legal documents, and barristers (called advocates in Scotland) who argue cases in court.
In cases where a trial is necessary, a client has to hire a solicitor, who will advise them and then retain a barrister on their behalf.
Solicitors have traditionally dealt with any legal matter other than conducting proceedings in court, although nowadays solicitors may appear in the lower courts and also if they have higher “rights of audience” (i.e. the right to appear in court on behalf of another person) in the higher courts.
Barristers, who have a general right of audience in all courts, represent clients in court and provide specialist advice on complex legal matters.
The easiest way to distinguish the two is to look at how they dress – barristers are the ones wearing wigs and gowns (yes, even in the 21st century), whilst solicitors will invariably be decked out in a dark suit.