Lobbying Versus Advocacy: Legal Definitions
"Lobbying" has a strict legal and IRS definition for nonprofits (click here to learn more), which generally only includes activities that ask policymakers to take a specific position on a specific piece of legislation, or that ask others to ask the same. In contrast, the common language definition of lobbying usually includes any discussion of issues with policymakers.
"Advocacy" encompasses any activity that a person or organization undertakes to influence policies. There is great latitude in this definition, and some people consider advocacy to be all activities that are not specifically lobbying, such as public demonstrations, or the filing of friend of the court briefs.
A good starting point to learn all of the legal differences between different types of advocacy activities is Charity Lobbying in the Public Interest's Lobbying and the Law page.