What ss7mm posted is an excellent text book explanation. In a perfect world, the 'near' wind usually tends to have more effect than the wind right at the target.
Unfortunately we, or at least *I*, don't live in a perfect world.
The terrain over which you're shooting has a lot to do with what matters - is there a cut in the trees further downrange, allowing a nice 'river' of wind to come through and smack your bullet about? Are there multiple ridges between you and the target that may give you some fits with vertical on target? Etc. and so on.
The 'near' wind theory makes logical sense... if you take the time to work out the numbers for a regular trajectory out to say 1k yds and then use start playing with wind values at various distances, the near wind does have the most effect, despite the velocity decay further downrange. The fly in the ointment per se, is one that most of us don't normally think about all that much - how high the bullet is off the ground at any given point in the trajectory.
Most of us have probably noticed that the wind often seems a lot stronger when we are standing straight up with our head 6'+ into the wind, vs. when we are laying down about a foot above ground. Now consider that your bullet is flying 10-12' over the line of sight, and god only knows how much over the terrain (depending on where you're shooting - even KD ranges aren't perfectly flat)... and the wind speed can pick up considerably as the bullet gets higher above ground. Even then it is rarely consistent.
So in effect its probably not so much the 'near' wind, nor the 'far' wind, but more the 'mid' wind where the bullet is at the apogee of its trajectory.
To be fair, this isn't something I came up with on my own. It's something I read in Bryan Litz's new book 'Applied Ballistics', and kind of smacked myself in the head as I read it, as it explains (to me) why when I get a firing point where I can actually use my spotting scope to watch the mirage, most long-range KD shooters focus back to about 2/3 the distance down range - which is awful close to the 'peak' of the trajectory.