Your hosts server has a nameserver (or two, or three... for redundancy). They generally take the form ns1.yourhost.com, ns2.yourhost.com, etc.... Everyone on that host uses that/those nameserver(s). Inside the nameserver are records, which point a certain domain to a certain location on the server.
When you register a domain, you provide your registrar with your hosts nameservers. That is what links your domain (at one place) to your server (at another place).
So it goes like this. You type in yourdomain.com in a browser. Your registrar 'directs your call' to your hosts nameserver. That nameserver has hundreds of domains in it, finds your domain, and sees that your domain points to you servers IP address.
To add to the complexity, web servers often support a thing called 'virtual hosts', which allows multiple accounts to reside on one IP address. Traditionally, the nameserver simply points a domain to an IP address. When using a shared server, there are dozens of clients using the same nameserver and same IP address. So your question is, how can it know where to direct the domain traffic if everyones on the same IP address and using the same nameserver? That's where virtual hosts come in handy. Most servers can assign multiple domains to one IP address to multiple directories. The entry looks something like this:
<VirtualHost 123.123.123.123:80>
DocumentRoot /home/yourusername/www
ServerName
www.yoursite.com
[more stuff here]
</VirtualHost>
So in a shared hosting environment, it goes something like this:
Domain --> Registrar --> Nameserver Record --> IP --> VirtualHost Entry --> Your Account