The force pushing the boat forward is based on the difference in velocities of the wind and water. Modern foil based boats pretty much have one wing sticking up into the air, and one sticking down into the water, and can eventually turn the relative motion into boat speed in whatever direction they want.