A URL is split into several parts, and the slug is the last piece of the path.
https://example.com/blog/hello-world?ref=home splits into protocol (https), domain (example.com), path (/blog/hello-world), and query (?ref=home). The slug is the last path segment, hello-world.
The slug is the part people read, remember, and share, so a clean, meaningful slug builds trust and improves click-through.