The headwind is the natural enemy of the cyclist. However, it will also be an unavoidable fact of your cycling life and you might as well learn to cope. Think of the wind as a bully - do you recall how a larger kid could simply put their hand on your forehead and keep you at arm's length while you punched away at the empty space between you with tears of frustration streaming down your cheeks? Cycling into the wind is often like that, but it needn't always be. Let's start with some basics.
The Wind is Not your Friend
A friend will let you win sometimes. The wind never will. Consider this fact - there is no aerodynamic difference between a 35mph wind blowing past a stationary cyclist, and a cyclist sprinting along at 35mph in calm air. Over 100 years ago this was a matter of some dispute among early aerodynamicists including the Wright Brothers, but it has been settled - the two bicycle-mechanics were correct1. So as soon as you begin to move forward, which is really the point of cycling after all, you begin to experience a headwind. If you're in really, really good shape, you might be able to achieve a speed of 45mph, but it's the consequent 45mph headwind you are generating that will ultimately defeat you. One obvious exception would be if there was a tailwind, which is a very big if.
The Wind is a Vector
Based on its direction, wind speed can be added or subtracted. Here's how it works. Say that in each of the following cases you are cycling along at 20mph. If the wind is not blowing at all, you will feel an apparent 20mph headwind. If a 20mph wind is blowing directly against you, you will feel an apparent 40mph headwind. If a 20mph wind is blowing from directly behind, you would feel no wind at all (but of course this scenario has never occurred; it is merely a theoretical possibility). Crosswinds help or hinder to the extent that their direction is aligned with yours. A 20mph wind directly at your side will not slow you down at all, unless of course it causes you to fall over. Now, if you are travelling north, say, then a 20mph wind from the north-east will feel like a combined 14mph apparent increase to your headwind and a 14mph side-wind that merely tries to knock you over. This doesn't seem fair because if the wind is divided equally like that, it ought to be that only half (10mph) is in your face and the other half is at your side - and it would be if the wind was your friend, but it's not - it's a vector.
Then Where is it Pointing?
When you're riding along and the wind seems always in your face anyway, how can you tell what direction it is actually blowing? This may seem like a stupid question, but if your trip is more than even a few miles, you will have plenty of time to ponder such things. Here is a subtle clue to look for; it's one that pilots have used. Notice the trees - obviously if there is a gale, then they'll be leaning hard and so will you - however, the more practical thing to notice about them is their leaves. The wind always pushes against them so that the backs of the leaves, which are lighter in colour, are windward and the tops, which are darker, are leeward. This is a difference that you can discern from a pretty fair distance. So, look around in all directions and where you see the dark-coloured leaves is where the wind is coming from; where you see the light-coloured leaves is the opposite direction to where the wind is heading. (This is also the direction you would like to ride in if at all possible.) The problem is in the winter when there are no leaves, but at that time of year your ride will not be a long or leisurely one anyway and you'll be be thinking of other more immediate things to do with survival.
So What Can You Do?
Why not? It could work. The key is to be wind-aware. Winds tend to be calmer in the early and later hours of the day. Winds tend to blow in from large bodies of water in the afternoon and blow back out in the morning. Winds roar through canyons and ravines all the time. Windswept plains are just that. In the spring and autumn winds will tend to be more changeable, and will be more constant in the summer. Don't worry; as you cycle more your awareness will naturally increase and you'll find yourself making choices that result in fewer beatings.
Find an Ally
So, the wind is a bully. Then who or what can help you? Slipstreaming may be an option. If you are riding with someone, you can quietly steer in just behind them and allow them to take the brunt of the wind. This is rather a win-lose situation that is inherently unfair - a fact sure to be noticed by your companion sooner or later.
Riding a tandem bike, with another person of course, is actually a much better option as it is win-win. From your point of view, you have nearly twice the pedal-power and from the wind's point of view, there is only one of you. It does require that you get along well with your co-rider as you can't just ride away in a huff and expect to leave them behind.
If there's only you, then you'll just have to tough it out. Try to make yourself as small as possible. On most bikes, this will mean keeping your knees and elbows in close while leaning over so that your forehead is touching the handlebars. It's not particularly comfortable.
Some good news then, hunkering-down-wise, is that stretching out on a recumbent bike gives a much lower profile with respect to the wind than folding up like a bat and is also much more comfortable.
Change Your Direction
Sailboats can manage in a full-on headwind by tacking (also known as 'zigzagging'), but they aren't constrained to a narrow strip of pavement as you are. This alarming tactic is to be avoided. Speaking of sailboats, if wearing a raincoat you can stop pedalling, lean back, outstretch the arms and make a sail that will (literally) foil the wind. Even though it will actually work, this hazardous manoeuvre should be avoided too if you are riding in a group, or in traffic - the reasons should be obvious.
No, in case of a headwind, you want to change your direction not just slightly, but completely. This involves having a Plan B with a different destination altogether and in the opposite direction of Plan A. For a day trip, this just means having considered the options of cycling out to a beach for a nice swim and lunch, or cycling inland to a pond, lake or river for the same. If your trip will be longer by days, weeks or months, then this option may not be for you and you'll just have to hunker down.
Treat it as an Uphill Climb
Too many people have fallen by the wayside with injured knees because they thought they could fight the wind. Don't be one of these. Cycling against the wind is really no different than cycling against gravity. Mountains are implacable, and so is the wind. Shift down to a lower gear and keep your rpm's up. You'll go slower, but you'll go the distance with knees intact.
Get Into It
Consider all the benefits of having a great big wind roaring past.
Ok, here's one: flies can't tolerate high winds so there won't be many of those about. Consider too, that there is actually no such thing as a constant wind. If you really pay attention you will notice brief lulls, helpful gusts, and slight changes of direction and you will come to appreciate these. Also, use visualisation techniques to motivate yourself - athletes do this all the time. Think of yourself as a salmon swimming upstream, there to spawn briefly and then die of exhaustion.
Admittedly that seems like a stupid visualisation, but if your trip is more than even a few miles, you will have plenty of time to ponder such things. You'll think of something.