The two words have been used synonymously in many cases. However, there are notable differences depending on where you’re from. The exact meaning varies among different variants of the English language. One way you can think of it is that a pier is like a sidewalk over the water and a dock is a parking space in the water.
A pier can be defined as a man-made structure for transitioning from water to land. It can be made from wood, steel, or concrete. They can be anywhere from 15-50 feet tall and are supported by pillars that come up out of the water. It is used for many things such as entertainment, a simple strolling area to look out to sea, or for tying up boats in order to get back on land.
A dock can be characterized as being a watery area next to a pier where a boat is parked alongside a human-made structure. Unlike a pier, this definition refers solely to the water around the architecture it is tied to. The other version of dock refers to the actual construction itself. Boaters would use this dock to tie their vessel up to keep it from floating away.