Changing the URL for the entire web requires you to:
- Create a new DNS entry for the new domain name
- Create an AAM (Alternate Access Mapping) in Central Admin for the new domain name
- If IIS isn't automatically updated (I cannot recall this), create a new entry in IIS for the new host header (domain name) and point it to the appropriate directory for the site collection
If you only require the site collection's url to change, and are utilizing the existing domain name (ex: www.domain.com/subweb) you can create a managed path for the Web, and attach the site collection to that.