system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do boat sails work if the wind is going the wrong way?

If the wind is going towards you, how are you going forward? It doesn’t seem like a very reliable system, same if there is no wind.
gpt
If there is no wind you're going nowhere. When there is wind your sailboat can move. Let's sneak up on the answer to your question by answering a few related questions first. 

Let's assume the wind is blowing from the North at 10 knots (about 10mph). 

How fast can you sail South? The fastest your sailboat can travel directly downwind is the current wind speed, in this case 10 knots. The fraction of this speed will vary greatly depending on your boat. Sailing directly downwind will make the wind feel very calm on the deck of the boat since the boat travels at the same speed and direction as the wind.

How fast can you sail East or West? Counter intuitively you could sail East or West much faster than the wind speed. Why isn't the wind still blowing our boat South while we face East or West? It is because all sailboats have a keel. The keel is the big fin on the bottom of the sailboat. The keel allows the boat to slide forward on the water easily, but the boat is difficult to push sideways. The keel looks narrow from the front and wide from the side. How does this make us faster? When we were sailing downwind we could move as fast as the wind but no faster because we would run out of wind. When we're going sideways to the wind our sail collects the wind and pushes us. The keel keeps us from pushing sideways, so we push forwards instead. As that wind spills out of our sails there is new wind from the North replacing it, so we keep getting more and more power. We're not running away from the wind, so we don't run out. A good sailboat will fly when the wind is from the side.

So, finally, how fast can you sail North? Well, you can't, not directly, but we can sneak up on it. We already learned that our boat is faster going East/West than South. What if we went a little tiny bit North of East? Well, our speed doesn't instantly drop to zero just because we're pointing a little bit towards the wind, we're still mostly going East where we're fast. We're not going as fast pointing a little North, but we are moving a little North (and a lot East). So, let's point a little more North. Now we're moving slower, but we're going a bit more North and a bit less East. We can keep on pointing more and more North until we lose so much speed that we stop moving. Somewhere before that point, often about halfway between North and East you'll find the spot where you're still moving well and you're getting equal amounts of North and East. All of the North travel is good. All of the East travel is wasted. At some point your sailboat gets too far off to the east. You'll turn your boat to the North West and do it in that direction. Your North travel is still good, and your West Travel is undoing all of the wasted East travel that you did before. This is why sailboats Zig Zag when traveling towards the wind.