A sailboat can advance against the wind without defying it. The trick is indirect. Rather than pointing straight into the breeze, the boat sails at an angle, using the forces on its sails and keel to move forward while resisting the sideways push that would otherwise send it drifting.
The sail is more than a surface waiting to be shoved. Shaped and angled to the apparent wind, the airflow felt aboard the moving boat, it generates an aerodynamic force that includes lift. Much of that force points sideways, but the keel or centerboard pushes against the water and produces a hydrodynamic force that resists sideways motion. Together, these forces leave a forward component that drives the hull. Water and air share the work. Drag slows the boat, and some sideways slip remains; neither surface acts like a wall.
The route upwind is a negotiation, not a straight line. A boat cannot normally sail directly into the wind, where its sails lose their useful shape and driving force. Instead, it travels along one angled course, then turns its bow through the wind and takes another, a maneuver called tacking. Each leg gives up some sideways distance in exchange for progress toward the destination. The trade is never free. Tacking takes time and can cost speed, while the closest practical angle depends on the boat, its sails, and conditions. Across the water, the course becomes a zigzag: a reminder that the shortest path is not always available.