Your understanding is close. Each 3D model is made out of vertexes. Each vertex usually defines the location of a point in space, a normal (used in lighting calculations) and 1 or more texture coordinates. These are generally designated as u for the horizontal part of the texture and v for the vertical.
When an object is textured, these coordinates are used to look up which texel or pixel to plot from the texture. I find it easiest to think of them as percentages or ratios between the left edge of texture (u = 0) and the right edge of the texture (u = 1.0) and from the top of the texture (v = 0) and the bottom of it (v = 1.0). They are interpolated between the vertexes and looked up for each on-screen pixel that is rendered. They can be larger or smaller than these ranges and the render state that is set when the object is rendered specifies what happens. The options for this are CLAMP and REPEAT. Clamping limits the coordinate to either 0 or 1, causing the texture to smear where it is outside of the range. Repeat causes the texture to repeat when it is outside the range; it is effectively the same as grabbing just the decimal portion of the coordinate and using that in its place.
Before the texture coordinates are applied onto an object, they are multiplied by a texture matrix to apply some transformation to them (such as scaling, translation or rotation). This effect is sometimes animated in games to make it appear as though something is moving across an object without having to move the object itself... the texture is simply scrolling across it. When the texture matrix is multiplied by the texture coordinates, it produces 2 values that are used to look up the texel to plot (lets call them s and t). These are generated automatically from u and v even when the texture matrix is not set; it is the equivalent of multiplying u and v by an identity matrix.
This is where the w coordinate comes in, though it isn't used that often. It is an extra parameter to multiply the texture matrix against and is usually used when you want to take perspective into account (such as in Shadow Mapping). It works the same as when you transform a location in object-space to screen-space via a world-view-projection matrix. By multiplying the UVW with a projection transform, you end up with 2 coordinates, the s and t which are then mapped onto a 2D texture.