The default key to raise/lower sails is W. Tap it twice if your sails are up, to lower them to full sail. Use A and D keys to turn left or right to make sure you are not pointed directly into the wind. Some ships sail better or faster upwind, depending on their sail type. A square sail does not move very fast heading into the wind direction.
The "sail to" command only works for points of interest/mooring within a certain radius, so only nearby ports/ships will appear as options.
As oldtimer mentions, you can also use the Worldmap command to enter the worldmap where keys W A S D work for forward, left, right, stop, and return back to sea mode.
You can also sail directly in sea mode, but it will obviously take much longer; worldmap time moves much faster. The Age of Pirates - City of Abandoned ships contains the original manual for the game and is provided in .pdf format.