How Unreal Engine figure out Rotation, Velocity, Transformation through coordinate system?

Even better explanation about quaternions:

v=3BR8tK-LuB0

Yes youtubes sometimes give good suggestions