While in cruise, without GPS how does a pilot know the wind direction? The airspeed sensors only register forward speed. Is it a matter of reaching waypoints sooner or later? And if flying on a compass heading how do they know what their ground track is and whether or not they're being blown off course? Especially with no visual reference.
With no visual or instrument references you don't know if you have a headwind, tailwind, or crosswind.
You also don't particularly care because you're flying a plane with no way to navigate and therefore have more imperative concerns.
With visual references it's something you can determine with a little thinking and some intentional oversimplification:
Headwinds mean your ground speed is lower than your airspeed.
If your airspeed is 100 miles per hour and you're flying a 25 mile leg it should take you 15 minutes. If it takes you 18 minutes you know you've got a headwind.
Tailwnds mean your gound speed is higher than your airspeed.
If you're flying the same 25 mile leg at 100 miles per hour and it only takes you 12 minutes you have a tailwind.
Crosswinds are a bit more difficult: The easiest way to tell you have a crosswind is if you know what your magnetic heading should be in order to fly toward a given point and you have to point the nose at a different compass heading in order to maintain the desired ground track you have a crosswind.
Note that you almost never have a direct headwind, tailwind, or crosswind, but rather some wind at an angle to your direction of travel which will have both a crosswind component and a headwind/tailwind component. The wind speed and direction can be computed using an E6B flight computer with relatively little effort.
If you have instrument references the problem gets easier:
GPS is the ultimate solution -- it can display your ground speed and ground track, from which you can derive the winds. GPS systems that know your airspeed can even calculate the winds for you so you don't need the E6B anymore (unless the GPS breaks).
VORs provide a magnetic heading reference, which simplifies the crosswind calculation (and largely eliminates the need to do one to figure out your crosswind correction angle: Just keep the needle centered and you have your desired crosswind correction).
It doesn't give you the wind speed and direction without some additional data (how long it takes you to cross some waypoint or fix), because you still need that information in order to determine how much of the wind speed is acting as a headwind, tailwind, or crosswind component.
DME systems can give you your groundspeed. In combination with the VOR this gives you the same information as the GPS and makes determining the wind speed pretty simple.
ADFs can be used for this kind of calculation in the same way as you would for a visual waypoint: If you expect to be flying due north to head toward an ADF beacon and you're flying 010 degrees to keep the pointer needle where you want it then you know you're dealing with some crosswind component.
In addition to the other answer (which is great) some of this planning happens before the flight leaves the ground. In the flight planning process you can get both winds aloft and winds at various airports in your route via the ATIS. While it is true that winds will change over time (if you are on a long flight) headings are pre calculated with the known winds at the time of departure. If you are planning a very long flight you can check the outlook forecasts (which may not end up being accurate) and plan your headings with those.
Once in the air you can listen to the ATIS along your routes to get live winds below you. This is of course assuming you know which airport is beneath (or near) you at a given time. You may also be able to get weather from a Flight Service Station in route or Flight Following if its provided. Again this is reliant on you knowing where you are, aside from flight following which will actually tell you where you are if its provided.
This all assumes you have a functioning 2 way radio.