Domain name is very essential to host a website whether it can be static or dynamic website.
But in order to get a domain, you need to purchase it from few providers like GoDaddy, BigRock etc.
But when you don’t have money to purchase a domain, let’s say you want to learn “how to host a website in real world “. at that time you need a domain , in that cases you can simply go to the website called http://www.freenom.com
“Freenom” is a website which provides free domain for few months(3 months) for testing and learning but if you want to extend the domain services after specified months you need to purchase it.