Office 365 creates a domain for you, like contoso.onmicrosoft.com, when you sign up with the service. The user ID that you create when you sign up includes the domain, like alan@contoso.onmicrosoft.com.
If you want to have your email look like alan@contoso.com: buy the domain.
Steps to Add your users and domain to Office 365
Add your users and domain to Office 365 if you own it already.
You can’t rename the onmicrosoft domain after sign-up.
For example, if the initial domain you chose was fourthcoffee.onmicrosoft.com, you can’t change it to be fabrikam.onmicrosoft.com. To use a different onmicrosoft.com domain, you’d have to start a new subscription with Office 365.
You can't rename your team site URL.
Your team site URL is based on your onmicrosoft.com domain name, and because of the way SharePoint Online architecture works, unfortunately you can't rename the team site.
You can't remove your onmicrosoft domain.
Office 365 needs to keep it around because it's used behind the scenes for your subscription. But you don’t have to use the domain yourself after you’ve added a custom domain.