One of the most confusing subjects for me to grasp early on was understanding the SharePoint hierarchy. I couldn’t tell a web application from a site collection. It confused me to no end. Well, after much study it seems rather simple now! Here’s a diagram with a short explanation.
At the top of the hierarchy are server farms. This encompasses all the physical servers that comprise your SP installation. It may consist of one server or twenty. When you run the SP configuration wizard after installing MOSS/WSS you either create a new server farm or connect to an existing one. It’s done once.
Once you have your server farm you must set up a web application. This is what creates a corresponding website in IIS to host the site. This is where it gets its application pool and other IIS properties. You can create multiple web applications on a server farm.
Now you have a hollow web application but nothing else. Enter site collections. It is simply a collection of SharePoint sites inside the web application. Here you define a top-level site. You can have multiple site collections.
From your site collection you have a top-level site that will have multiple sites underneath it. This is the common SP interface seen by end users.
And finally we have the content inside the sites. This includes (but not limited to) lists, libraries, web parts, etc.
It’s worth mentioning that in the SharePoint 2007 world, Shared Service Providers (MySite, Excel Services, BDC) in MOSS are at the web application level and are for all site collections underneath it. You can, however, have different Shared Service Providers for individual web applications. In the 2010 world, there are Service Applications that can be used in a more reusable and granular fashion than in 2007.