The answer to this question is, of course, “It depends.” It depends on the context.
First, let’s get some terminology out of the way. We are all familiar with a domain name, like example.com. The bit in front of a domain name, www or whatever, is a subdomain. The domain name without any prefix is sometimes referred to as a “bare” or “naked” domain.
What’s the www for?
Originally the www subdomain prefix was intended to refer to the website within a particular domain, as opposed to other subdomains like ftp (referring to the file transfer site) and so on. Web publishers will now often use a subdomain to host their blog (eg blog.example.com) or for particular large areas of their website, such as areas of legal practice (eg commercial.example.com).