In law, the bar is the legal profession as an institution. The term is a metonym for the line (or "bar") that separates the parts of a courtroom reserved for spectators and those reserved for participants in a trial such as lawyers.
In the United Kingdom, the term "the bar" refers only to the professional organization for barristers (referred to in Scotland as advocates); the other type of UK lawyer, solicitors, have their own body, the Law Society. Correspondingly, being "called to the bar" refers to admission to the profession of barristers, not solicitors.