When Otis Redding sang that he was "sitting on the dock of the bay" he gave away a key geographic fact about the bay: it was in the United States. When bringing a ship into port and looking for a place to tie her up, it helps if you know whether the person you are negotiating moorage fees with is speaking American English, or British English
In British English, a dock is technically the spot in the water where the vessel sits while tied to a pier, wharf, or other structure. Think of it as the equivalent of "parking space." In the US, a dock is the actual structure the vessel is tied to. These structures have their own names, and their exact usage may vary. A pier is a dock perpendicular to the shoreline in some places, in others it's a dock with a specific industrial function, such as seafood processing. Pier may also refer to any structure that stretches out over a body of water, such as a fishing pier. A wharf is parallel to the shore in some usages, but the word also refers a fixed (as opposed to floating) structure where vessels load or unload. In this usage, the wharf may also serve as a short-term storage facility. A quay is any dock used for loading or unloading. "Quay" may be pronounced like "key" (the preferred UK pronunciation) or "kway" (preferred in the US), although in the US you are more likely to hear the term berth. Berth can also refer to a specific spot on a dock, again similar in meaning to "parking space."
Mooring lines. Once alongside the dock, a vessel is secured using mooring lines. Each line has a name, based on its function. In the diagram above, the lines labeled "2" and "5" are called breast lines, and are used to hold the vessel against the dock. Lines "3" and "4" are spring lines, and prevent the vessel from moving back and forth along the dock. Number "1" is called a headline, or bow line, and "6" is a stern line. These also restrict lateral motion.
Dry docks. A dry dock is a dock that can be raised from or lowered into the water with a vessel secured inside it. This allows access to the underside of the vessel for repairs or inspections. Although the term "dry docked" is sometimes used by laymen to mean a vessel not currently being used, in fact dry dock time can be very expensive, so most vessel owners want to "splash" their vessel again as soon as possible. The proper term for a vessel taken out of service is laid up. Similar in construction, but opposite in function is an impounded dock, a large chamber which holds water in and thus allows vessels to keep floating when the surrounding water is too low, such as a low tide.