A domain, or Uniform Resource Locator (URL), becomes the name of your website's address online e.g. nameofyoursite.com.
If you were to stay with Wix's free hosting, your site would be assigned a WIX domain e.g. accountname.wixsite.com/siteaddress, and they would also show ads on your site.
A custom domain e.g. nameofyoursite.com, is always recommended, and you can secure these a number of ways:
Wix offer 1 free custom domain with each premium plan
Domains can be purchased through Wix
You can purchase domains through other registrars e.g. GoDaddy
I recommend GoDaddy as I've been using it for many years and find it very easy to use and affordable.
I like having any domains I purchase with the one registrar and it makes it easy for me to keep control over them regardless of whether I want to direct them to WIx to link to a Wix site.