By using a GPS or an INS as suggested, or by taking your TAS and heading, adding the known wind and calculating the length of the resulting velocity vector.
How to find out which way the wind is blowing? By using a hight-tech gadget called a 'windsock'.
If you're up in the air, check your drift.
In the good old days they had an instrument specifically intended to check the drift angle. Checking the drift angle on two different headings would enable you to calculate the wind speed and direction.
I thought I was doing good trying to avoid those airport hotels... and look at me now.