(from the Apple support article http://docs.info.apple.com/article.html?artnum=106850)

The Dock provides a convenient location for opening items that you use frequently, for accessing contextual menus, for creating hierarchical menus, and for storing minimized windows.

The Dock separator is the line that separates the different types of short cuts. Applications always appear to the left of (or above) the separator. Files and folders go on the right side (or below) the separator.

To add an item to the Dock, just drag it to the correct side of the Dock. If you drag the item to the wrong side of the separator, the Dock does not accept it.

[Note: When you add an item to the Dock, always remember that the original item is still stored in its original location. The Dock does not store a full copy of the original item, only a short cut to it.]

To remove a short cut from the dock, click and drag it off the dock onto the desktop. It will disappear in a puff of smoke.