A URI (Uniform Resource Identifier) is the umbrella concept for a string that identifies a resource; URL and URN are its two subtypes.
A URL tells you a resource's location and how to access it (e.g. https://…), while a URN is a persistent name for a resource independent of where it lives (e.g. urn:isbn:…).
A common misconception treats URL and URI as synonyms, but precisely URL ⊂ URI. A URL is composed of a scheme (https), host, port, path, query, and fragment — it says 'where and how to fetch'. A URN, like `urn:isbn:0451450523`, is an identifier that stays valid no matter where the resource physically resides, making it robust to relocation.
In practice most work involves URLs, so people loosely call everything a URL. But the distinction matters when reading specs or designing APIs — XML namespaces and content identifiers, for instance, use URIs as names (URN-style) rather than locations. The host portion of a URL is resolved to an IP address via DNS.