Google indexes sites & pages based on URLs, so any changes to individual page URLs need to be made carefully, with 301 redirects put in place.
When it comes to changing your actual domain to a completely new domain, then you’re into a different league. Planned carefully and implemented properly, it is possible that your new domain can achieve good rankings but to re-emphasise, a proper plan for transitioning needs to be in place and implemented.
Thought needs to be given to ‘warming up’ the new domain – put some content a few pages, so that Google can find and index the new domain, so it’s not a completely brand new site on the day of your switch to the new site. Other things to consider include re-routing backlinks, redirecting old URLs to their corresponding new URLs (surprising how often this one is overlooked and the number of 404s visitors then see – not great for Google and certainly not great for potential customers!), sorting out your XML sitemaps and adding change requests to Webmaster Tools.
This article, From oDesk to Upwork, shows that a domain migration can even produce better rankings, when done well. Worth a read.