Every host name that you want to be accessible on the web needs a DNS entry: either a CNAME or an A record (or AAAA if you have an IPv6 address). If you don't have one, all anyone who tries to load pages from that host will get is a DNS error message, something like "The server at nosuchhost.example.com cannot be found."
This applies just as well to www.yourdomain.com as to any other host name. The only exceptions are raw IP addresses like 127.0.0.1, and the fact that you can set up wildcard DNS records to map all hostnames under a given domain to the same address. (For example, Stack Exchange has a wildcard record for *.stackexchange.com, which matches both webmasters.stackexchange.com and any other hostname ending in .stackexchange.com.)
The actual question you seem to want to ask is, what should you do once you have working DNS records for both yourdomain.com and www.yourdomain.com. In general, there are three options:
Serve the same content from both host names. This essentially creates a duplicate copy of your site, and could potentially cause issues with search engines. (In practice, however, most search engines will have ways of handling that particular situation gracefully, since it's so common.)
Configure www.yourdomain.com to redirect the user to the corresponding page on yourdomain.com. This is the solution advocated by the folks at no-www.org, and, incidentally, what I prefer myself. One way to do this, if you're using Apache with mod_rewrite, is to add the following lines to an .htaccess file in the webserver root directory for www.yourdomain.com:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Configure yourdomain.com to redirect to www.yourdomain.com, as advocated by www.yes-www.org. This makes for longer and, arguably, less readable URLs, but could at least in theory have some advantages in certain rare situations, e.g. if you're running a large site that's both getting a lot of HTTP traffic and using yourdomain.com for some other purpose that needs its own dedicated set of servers. In practice, such situations rarely come up these days, and so the choice between options 2 and 3 is mostly a matter of taste.
Of course, you could also do something else, such as serve completely different content from yourdomain.com and www.yourdomain.com. However, that's likely to confuse your users, and so should generally be avoided.