If you want to change the magento domain name or migrate to a different server with new domain name then you can follow the below steps. You will need access you MySQL database and you can use MyPHPAdmin. Any tool that can access your database will work. Magento stores all the details in database so you will have to make changes in database. Make sure you always take database backup before making any changes.
Open the magento database in phpMyAdmin and browse the table core_config_data and in the path column search for below fields.
Now edit the row containing above fields and change the value to new domain and save it.