how to find rotation from direction of velocity

For example, I have a spear, the head of the spear always points in the direction it is going just from reading its velocity.

how do I calculate the rotation just from the velocity?

Have a look at Quaternion.LookRoation()