FreeBSD is targeted at x86 running on desktops and servers, and is generally considered the most "complete" distribution for those use cases, with the most packages available for that platform, widest range of features, etc.
NetBSD focuses very heavily on portability. They target lots of architectures, focus on getting cross compilation working well, and spend a lot of time worrying about doing things "right" rather than expediently (for what it's worth; this can be good or bad depending on how you look at it). Their package manager/ports system is known as "pkgsrc", and also focuses on portability, such that it also runs on other platforms like Linux, Mac OS X, and so on. If you want to try porting a BSD to your odd little MIPS-based microcontroller, NetBSD is your best bet.
OpenBSD is focused extremely heavily on security. If you are paranoid, you want to run OpenBSD. If you are not paranoid, you should be. They are out to get you. Don't let them.
And the other major BSDs that you didn't ask about:
Dragonfly BSD is a sort of next-gen fork of FreeBSD, a bit more experimental. The biggest new feature is its HAMMER filesystem, which is in the class of modern filesystems like Btrfs and ZFS, supporting things like snapshots, checksumming of data and metadata, mirroring to backups, data deduplication, and the like. It also has other features like user-space virtual kernels, better parallelism, etc.
PC-BSD is designed to be a user-friendly, desktop-oriented BSD, which manages applications as separate bundles with installers, more similar to how they work on Windows on Mac OS X, than a traditional BSD ports system or Linux package manager which tries to manage shared dependencies (a PC-BSD package comes with all of its dependencies, which are installed separately from those of other packages).
OS X is a hybrid operating system, based on combining the Mach microkernel, FreeBSD, and some NetBSD tools, along with a proprietary UI layer and applications. It runs on desktops, laptops, and ARM-based smartphones. It is well known for its user-friendliness, tight integration between software and hardware, and draconian application development policies for its package management system, the App Store. Luckily, there are alternative ports systems available, such as MacPorts, Homebrew, and Cydia.
FreeBSD focuses primarily on flexibility, NetBSD on portability, and OpenBSD on security. Or something. There is of course much overlap in the way their goals are accomplished.
This HN link( http://news.ycombinator.com/item?id=4798791 ) introduced me to the knowledge that OpenBSD is commonly installed on networking gear, instead of (for example) Cisco IOS. So you could say "freebsd on your desktop and/or server, and openbsd on your router." I confess that I don't know enough about NetBSD to offer an optimal use case.
I run NetBSD as a web server, but not for any good reason -- it's just personal preference. I ended up with NetBSD rather than one of the other variants because it's easy to set up as a Xen domU (instructions at http://wiki.prgmr.com/mediawiki/index.php/NetBSD_as_a_DomU if anyone's interested).
The impression I got from "Code Reading" by Diomidis Spinellis is that NetBSD is fantastic for learning the internals of a real UNIX. The emphasis has always been on correctness and clarity first.
I feel a worthy, yet absent, *BSD would also be DragonFlyBSD.
Exactly what the difference is between DragonFlyBSD and other BSDs I will leave for someone else to summarise in a more definitive way, however my take is that it is all-round more "modern".
Dragonfly BSD is a "logical" continuation of FreeBSD 4.x. FreeBSD changed how it handles SMP in 5.x, while Dragonfly seems to be geared towards kernel level clustering.
Since this story is the second time this month I saw prominent begging for donations on a *BSD, suggesting that one or both projects are on life support - I wonder why these projects can't be better unified (or one eat the other's lunch). Is this essential to purpose or just historical?
The projects have branched over feature politics. FreeBSD is by far the most popular and advanced, NetBSD is very clean and easily ported. OpenBSD was a later fork that emphasises security, and omits binary "blobs". Generally code is exchanged between the projects. Dragonfly BSD is probably the smallest notable fork (there are more). It's relatively recent and is a "logical continuation of FreeBSD 4.x". FreeBSD moved towards a new system for SMP in 5.x.
My understanding is the BSD projects originally forked over personality/political issues with the defunct 386BSD project, and only later did they begin to focus on certain feature sets.
NetBSD forked from 386BSD, which is the PC port of the Net/2 4.3BSD source code release.
FreeBSD is, in some vague sense, the continuation of the 386BSD project. It's a fork, but a fork in which the parent died out.
OpenBSD is Theo de Raadt's fork of NetBSD. Theo was one of the NetBSD founders and had a falling out with the NetBSD core team.
The origins of all three projects are basically accidents of fate, but FreeBSD has taken up a role as the "optimized for x86/x64 servers" BSD, OpenBSD (obviously) as the "secure" BSD, and NetBSD is the "portable" BSD. In practice, NetBSD sees some use in embedded/appliance scenarios, although Linux has pretty much taken over the world there.
A lot of NetBSD code ends up being imported into FreeBSD. Same goes for OpenBSD and DragonflyBSD -- I wouldn't want to run any of them myself, but I'm glad they're out there.
Off-topic, but this discussion might attract the right people.
How much NetBSD-originated code remains in Darwin and OS X?
I remember that in the initial betas, there was heavy usage of NetBSD's userland (at least); I've no idea how much remains today.
EDIT: Everyone's mentioning FreeBSD, but I swear to $GOD[0] that I remember seeing 'NetBSD' at the top of many early man pages. NetBSD's site seems to remember something similar: http://www.netbsd.org/gallery/products.html#darwin
A lot of the BSD that's in OSX actually predates either FreeBSD or NetBSD, coming via NeXTStep from BSD 4.3 and via Mac OS X Server from 4.4. In addition there are FreeBSD influences. NetBSD seems largely independent.
Yeah, I saw that line and didn't know whether that was a connection or not (that's why I used some weasel words to hedge).
Looking at it more closely, it does look like a connection, but I think it is a fairly minor one. The first Mac OS X Server was still pretty close to NeXTStep/Rhapsody.
The bigger changes came later with Mac OS X, which was a major rewrite.
Everything I've read has said that OS X featured parts of FreeBSD, never heard of NetBSD being used. (Yes, they are sibling projects and probably share more code than I'm aware.)
But, let me guess, "everything you've read" does not include the source code?
Are we talking the "part of OSX" that is called "Darwin"? If so, the code is all online. Easiest way to determine how much code is from NetBSD is to read it. And diff it against NetBSD's CVS repo.
Sort of. Running diff alone will tell you when code is similar or the same, but it won't tell you whether that similarity is because code moved directly from NetBSD to Darwin (or vice versa if that happened) or because they share many common ancestors (from the graphic, that would be at least BSD 4.3, BSD 4.4, BSD NET/2, 386BSD,..)
I've never used ABC BSD for any significant length of time, but here's what I know. ABC BSD is for X, DEF BSD is for Y and GHI BSD is for Z.
Although I don't use ABC BSD, read their code or particpate in making contributions, here's how ABC BSD works ... and here's the lowdown on their code ...
Oh, and the history of ABC BSD is .... I know because I've always been a user of Clickity Click OS and I've been watching ABC BSD.