'W' doesn't mean anything in a universal sense; it's just "Not X, Y, Z, U, or V."
When we're dealing with XYZ coords, like position, there's also a hidden fourth coordinate that is used, which is referred to as 'W'; this coordinate is useful for the transformations needed to put a vertex into perspective space, and especially for getting perspective-correct interpolation of vertex data. The object-space value of this coordinate is 1 for all vertices. There's no reason to expose this coordinate to users, because there is nothing they'd want to do with it.
As with W, XYZ doesn't mean anything in particular. They're symbols, and their meaning is context dependent. We regularly use X to mean position along the width axis in object space, or world space, or time in the graph editor, or U in the UV editor.
UV is usually used to refer to a position along the horizontal and vertical axes of an image. These might be more easily considered X or Y positions. Why do we call it UV and not XY? Because we were already using X and Y to designate other information. U and V, like W, just mean, "Not X Y Z or W." (Because W, in the use described above, actually predated UV. We picked 'W' because it was the last letter not already in use, and then we picked 'UV' because they were the next two letters not already in use.)
You can have 2D texture coords or 3D texture coords or 15D texture coords if you want, but Blender supports only 2D texture coords. It is not necessary to have a 3rd coordinate to support typical use; in almost all actual shaders, if you read the code, UV will be a 2D value. Internally, your graphics card will need to do some careful manipulations of these values, including the W component calculated from the transformations of vertices, but there is no special W component for the UV.
When we rotate UV in the UV editor, we're doing an operation where it's not really clear what to call the third orthogonal axis. We can call that W if we want, we can call it Z, it doesn't matter unless we have to describe it to someone and there are conflicting uses of those letters in the conversation, at which point we should probably make up a new name for it. Saying that we are rotating it in 'W' would probably be even more confusing than saying we were rotating it in 'Z'; neither is literally true, the only thing that is literally true is that we're rotating it in an axis orthogonal to the two we see on the screen.
Texture coordinates with more than 2 dimensions are sometimes useful. For example, many of Blender's procedural textures can use 3 or 4 "spatial" dimensions-- and really, what constitutes a spatial dimension is arbitrary at that point, we could plug a 5th texture coordinate into some other socket. Texture coordinates with more than 2 dimensions can be emulated in Blender via the use of multiple UV channels. As a real-life example of this, we can make pseudo-generated coordinates by creating a frontal projection from view (bounds) and a profile projection from view (bounds) in different channels, and combining our X + Y from our frontal with our X from the profile into 3D coords. This is occasionally useful, not merely a stupid UV trick (we can get "rest pose position" coordinates this way, without worrying about how future modifiers are going to change our generated coords.)
When we use texture coordinates with more than 2 dimensions, it's not clear what we should call them. We could call them UVW coordinates. 'W' follows 'V' just like 'V' follows 'U'. Of course, that just raises the question, what if we use 4D coords? Any choice of name for these coordinates is arbitrary-- but a rose by any other name would smell as sweet.