into your Web browser and hit the enter key, your browser goes off to a DNS server
for a translation for the address - it wants the location, otherwise it obviously can't download anything. Once the DNS server receives the browser's request it searches its database for a resource record for the domain name, and if the nameis being hosted it will finds an IP address.
If the DNS server fails to resolve the name in this way, it makes a request to its parent server asking for name resolution. This process goes on up the heirarchical tree until the originating DNS server receives an answer or a 'Time to Live', which is a time limit set for an IP host requesting a response from another host, is reached. If This Time to Live expires, the DNS server returns an error code to the requesting client and your browser issues a message such as "connection to the server could not be established".
How can you stop it happening again? You can ask your host to make sure that they don't let it happen, for it's their fault, not yours.