Using A Kedge To Stop The Boat
An anchor deployed from the stern is the obvious choice if we have to come alongside under sail with the wind or tide behind us and can't slow or stop the boat by any other means. Provided the anchor is big enough to dig in easily and the bottom will provide adequate holding, just drop it a couple of boat lengths from the dock, and surge out the line until you come to a stop beside the dock. Take care to control the line safely around your bollard or cleat and to avoid rope burns and hands and limbs becoming caught in the line.
Use The Main Anchor To Turn The Boat Around
If you don't carry a kedge, you'll have to use the primary anchor from the bow, but the technique is a little more complicated. After dropping the anchor, give a quick bust of forward power if needed, then put the engine in neutral so you don't foul the prop with the anchor rode. As the boat continues forward you'll continue sailing over it until the cable snubs to swing the boat around, assisted by a touch on the helm — hopefully she should end up lying gently against the wall or dock if this tactic is well executed. An old sailing barge skipper told me how he did this on a regular basis, but he had years of experience and the barge had massive hull timbers to absorb the occasional bump.
But I have seen a modern boat do the same trick when a very experienced captain turned the boat around in its own length. The water was quite shallow, so he took the main anchor aft, secured it there, and ran the cable outside everything before securing the anchor rode at the bow. The length of the boat gave him the correct scope for the chain, so when he kicked the anchor off the stern, it went down, bit in, and the boat slowly turned around and lay alongside. It was a beautiful bit of seamanship. But if you don't quite get alongside and there's enough tide running, you can often sheer across the current by putting the helm over.