No sailing vessel can move directly upwind, though that may be the desired direction, making this an essential maneuver of a sailing ship. A series of tacking moves, in a zig-zag fashion, is called beating, and allows sailing in the desired direction.
Can you sail upwind?
Sailing Upwind
Unless the wind is blowing from directly astern (over the back of the boat), the sails propel the boat forward because of “lift” created by wind blowing across them, not by wind pushing against them. ... Modern sailboats can sail up to about a 45-degree angle from the wind.
Can Tall ships sail upwind?
"Yes, they can sail to windward. Its really a matter of how close to upwind they can get. A modern yacht can get closer than 20 degrees to the wind, the square rigged (Brig) sailing ship I used to crew on could do about 50 degrees on a good day.