A lawyer is a legal professional who provides advice, represents clients in legal matters, and advocates for their interests in court.