A domain name represents a permanent web address of your website such as yourchoiceofname.com. It is used to make it easier for your users to remember. A domain name usually represents an ip address, and you can usually get to a website by directly typing the ip address, but this means you would have to type in something like this http://22.214.171.124. A domain name makes it much easier to type in rather then typing in the ip address.
One reason why the web uses domain names is that it is a name or address that won’t get changed unexpectedly in the future. IP addresses can change depending on which server your website resides, which is exposed to possible change if you happen to move to a different web server location at some point. You can change hosting, and the domain will still remain the same.