If you look down on a bermuda rigged (big triangle) sail from above, it looks suspiciously like an aerofoil and those things fly. There is an angle away from the wind coming towards you which is as "close as you can get to the wind". At that point you are "close hauled", Try and go closer to the wind and your leading edge will collapse (luffing) and you will slow down rapidly and it gets a bit rubbish.
As you move away from the wind your speed will increase because of several things: less of the wind vector is trying to blow you sideways and more is actually pushing you. The aerofoil lift thing is less important compared to being pushed. The sweet spot is at around 120 degrees off the wind - there is loads of push and loads of "lift" and a minimal amount of sideways force being counteracted by the hull. This is called a "broad reach".
When the wind is behind you "running", there is a lot of push and no "lift" but instead you get drag due to the break up of laminar flow over the wing errr sail. However, in a run you send up spinnakers and "big boys" which are all basically bloody great bags to capture the wind and massively increase speed. Even a small yacht can "goosewing" by putting up two of the front sails - one on each side to increase sail area.
I've done about 30mph on a wind surfer in a broadreach - my mum drove along a road parallel to the beach and the wind was just right to do a broad reach roughly parallel to the beach and road. A car speedo is usually 10% shy of reality.
Sailing is great fun and can be really complicated but once you know your halyard from your sheet and all that stuff and get to the point where you can feel the wind and can see the conditions on the water and all the other things going on it is rather rewarding. The point of going from novice to supervised fun is quite quick - a weekend or so in a dinghy. A couple of weekends to be confident solo inland and a bit longer at sea. You do need to think safe.
Get it wrong and it can be a right old downer!