Unlike most letters of the Spanish alphabet, the w (officially called the uve doble and sometimes ve doble, doble ve or doble u) does not have a fixed sound. That is because the w is native to neither Spanish nor to Latin, from which Spanish evolved. In other words, the w appears only in words of foreign origin.
As a result, the w is usually pronounced similarly to its pronunciation in the word's original language. Since English is the language most commonly used as a foreign source of words in modern Spanish, the w is most frequently pronounced like its common pronunciation in English, the sound the letter has in words such as "water" and "witch." If you come across a Spanish word with a w and don't know how it's pronounced, you can usually give it the English "w" pronunciation and be understood.
It isn't uncommon for native Spanish speakers to add a g sound (like the "g" in "go" but much, much softer) at the beginning of the w sound. For example, waterpolo is often pronounced as if it were spelled guaterpolo, and hawaiano (Hawaiian) is often pronounced as if it were spelled haguaiano or jaguaiano. This tendency to pronounce the w as if it were gw varies with region and among individual speakers.
In words of Germanic origin other than English, the Spanish w is often pronounced as if it were a b or v (the two letters have the same sound). In fact, this is often true even for some words that come from English; wáter (toilet) is often pronounced as if it were spelled váter. An example of a word usually pronounced with the b/v sound is wolframio, a word for the metal tungsten.
For some words that have been part of Spanish for several generations or more, alternative spellings have been developed. For example, wáter is often spelled as váter, whisky (whiskey) is often spelled as güisqui, and watio (watt) is often vatio. Changes in spelling are uncommon with recently imported words.
Reference sources used for this lesson include the Diccioinario panhispánico de dudas (2005) published by the Spanish Royal Academy.