The phrase was originally nautical and referred to whether one was sailing close-hauled - ie virtually INTO the wind - or before the wind - ie in the same direction as the wind. Now, of course, it just means 'generally'....one way or t'other, as it were.