They have little boats (I cannot for the lie of me remember what they are called: lighters? ), that they put sailors in, these sailors row the little boats and drag the Ship backwards.
Launches. Every decent sized ship has them. At least they should, if you are going to be able to put men ashore at all without a wharf. They are also used to when you need to pull the ship off a shoal.