There are web hosting provider offering free domain name when signup for a hosting package with them. Since a domain name is so important as an identity to your website, you should make sure you have double check by reading through the terms carefully to ensure there is no domain ownership issues in future, you should make sure :-
- you are the registered owner of the domain name in domain WHOIS record
- you can transfer the domain name freely to other domain registrars
- you can host your website at other web hosting provider
- you have no long term commitment to this current web hosting provider
Just remember the golden rule here is no free lunch under the sun, every business needs to make money in order to survive, especially in an ultra competitive market like web hosting, there are all kinds of marketing techniques to drag you from moving away from the web host so that they can earn recurring revenue from you. I am sure you don't want to be tie down to a web hosting provider, especially if you need to surrender your domain name when you want to move away from the web host. Therefore, make sure you have read their terms carefully to ensure you will not the next victim.
A safe approach is to separate the two service, register your domain name with a domain name registrar, and choose a good and honest web host to host your website, in case you need to transfer your hosting elsewhere, just upload your website regular backup to the new hosting server, change the nameserver record at your domain registrations website to point to the new hosting server, wait for 24-48 hours and your website visitors are visiting your website at new hosting server.