What are the differences between UNIX and Linux, and what about all those choices within Linux?

What are the operational differences between Linux and UNIX? Why would a programmer choose one over the other? What about software selection and ease of programming (with already basic knowledge of programming, and wanting to dive in to open source)?

In terms of Linux, what makes things like Red Hat cost money and things like Ubuntu not? Is pay-for OS based on Linux better quality than freely distributed OS? What is the best choice for Linux-or-Unix OS for a budding programmer?