Consider a specific edition of Shakespeare’s play Romeo and Juliet, of which you have a digital copy on your home network.You could identify the text as urn:isbn:0-486-27557-4.
That would be a URI, but more specifically a URN because it names the text.You could also identify the text as file://hostname/sharename/RomeoAndJuliet.pdf.
That would also be a URI, but more specifically a URL because it locates the text.
A URI can be further classified as a locator, a name, or both. The term “Uniform Resource Locator” (URL) refers to the subset of URIs that, in addition to identifying a resource, provide a means of locating the resource by describing its primary access mechanism (e.g., its network “location”). The term “Uniform Resource Name” (URN) has been used historically to refer to both URIs under the “urn” scheme [RFC2141], which are required to remain globally unique and persistent even when the resource ceases to exist or becomes unavailable, and to any other URI with the properties of a name.
So any URL is a URI, but some URIs aren’t URLs, they’re URNs instead. Except the ones which are both URNs and URLs.