How does the math work behind the function: FRotationMatrix::MakeFromX?

The functions:

FRotationMatrix::MakeFromX, MakeFromY, MakeFromZ, etc.

What is the math behind this? It’s rather confusing to me. Thanks