what is the formula for magnitude and what exactly is it?
You'll have to be more specific. Magnitude can mean a number of things in a number of contexts.
NickSauce is right. Narrowing the scope somewhat, however, the magnitude of a vector is its length. If the vector's rectangular components are given (say vx,vy,vz) then the vector magnitude is sqrt(vx^2+vy^2+vz^2). Note that if we rotate our coordinate axes about the system's Origin, the components may change. But the magnitude is the same in both cases. That's one reason why the expression of equations in vector form is so useful in physics.
Separate names with a comma.