Summarize:

The cleat knot, or cleat hitch, is the most commonly used knots to secure dock lines. Start by sliding the loop on the rope through the cleat, under the top of the cleat. Then, wrap the loop over the arms on the cleat and tug gently on the loose rope to tighten it. Use simple cleat knots to secure all the dock lines for a quick, easy way to tie up the boat. A complex cleat knot is another option if you want to really secure the dock lines, though it will take more time than a simple cleat knot. Start by looping the line once around the bottom of the cleat. Then, slide the line over the top of the cleat and wrap it around the opposite side of the cleat. Raise it over the top of the cleat and loop it under the first arm to form a figure 8 shape. Make a small, underhand loop and place it over the first arm. Tug the end of the rope to secure the knot. You should have a nice, tight figure 8 shape on the cleats when you form a complex cleat knot. Use a complex cleat knot for all the dock lines, if you decide to use it. A clove knot, or clove hitch, should only be used if you are attaching dock lines to a piling, rather than to a dock. Start by wrapping the loose end of the line around the post or hook on the piling. Then, cross the line over itself once and loop the loose end around the post again. Put the loose end under the wrap you just made and tug the loose end of the line to tighten the knot. Make sure you use the clove knot for all 3-4 dock lines so the boat is tied securely to the piling.
Use a simple cleat knot to attach the dock lines. Try a complex cleat knot for a secure tie. Use a clove knot if you are docking at a piling.