To find the magnitude (length) of a vector in 2D or 3D, one uses the formula that takes the square root of the sum of the squares of the vector's components. For a vector a with components a1, a2, and a3, the magnitude is calculated as the square root of a1^2 + a2^2 + a3^2. The magnitude of a vector is denoted by |a|.