It depends on how your dns and apache config on the server is setup. Most people have it that www.example.com points to the same IP in the dns as example.com. Then they set apache so that both versions point to the same folder in the server. So typing in www.example.com/index.html will give you the same file as example.com/index.html.
There is a complication to this usualy setup. Some times the search engines view the two versions of the name as separate sites (as if www. is just a subdomain with identical content.) So the PR for the two domains remains separate. It doesn't hurt to give the search engines a hint that that both versions are the same place and which is your preferance. You make a 301 perminant redirect form one version to the other. It's up to you which version you redirect (personally I don't see the point of www. all the time any more.) This 301 redirect is done using a .htaccess file in your site. Just put in some code like this.
or if you prefer to default to not using the www.