About iPhoto libraries
iPhoto stores all of the photos and information about your photo collection in an iPhoto library. When viewing an iPhoto library in the Finder, it appears as a single icon, known as a package, but in reality, that package contains a whole hierarchy of folders and files inside of it. When you import photos into iPhoto, they are copied by iPhoto into the library package, and iPhoto takes care of organizing them within that library and keeping track of where they are. iPhoto also creates a handful of its own data files in the library along with the photos themselves. These files contain information such as how you have your photos organized into albums, the title, ratings, keywords, and other information you assign to your photos, and much more.
An iPhoto library is a self-contained unit, so all the photos and related data are all stored within that one library package. This means that you can backup, move, or copy the library by simply copying or moving the library package using the Finder, just like you would copy any other file or folder.
Typically, while working with iPhoto, it keeps all the details of the library package hidden from you. You can just use iPhoto's interface to manage your photos, and you never even need to look inside the iPhoto library package itself. However, in some cases, especially if you encounter problems with your iPhoto library, in can be useful to know a little bit more about what goes on inside the library. If you wish to delve into the library package's contents, you can do so by control-clicking on it in the Finder and selecting "Show Package Contents" from the contextual menu. If you choose to do so though, do not move, rename, or delete any items within the library package. Altering the library contents in this manner can cause iPhoto to become very confused, and thus is not recommended.
If you wish to learn more about the internals of an iPhoto library, you can read more in iPhoto Library Internals.