The 4th element in a 4D vector is used by translation and perspective matrices for 3D vectors (there are also 4D vectors in their own right, but they aren't used except in specialist applications). A value of 1 makes it affected by translation and perspective, a value of 0 makes it not affected by either. 4D vectors with a 0 for W are normally used for directions which need to be transformed by the same matrix as position data (e.g. surface normals, although non-uniform scaling breaks them too and this doesn't protect against that), or to represent infinite distances away.
Just ignore them if you don't understand it, and your 3D vectors will have the "w=1" that's needed to do perspective calculations added automatically.
