Although "msgString" is declared as a char array of length 128 the example does not use any index to write to it. That's alone something I don't understand
sprintf knows how to handle character arrays. A character array is also called C string if handled as in your sketch.
Basically, if I understand this of your post
Lets make an example. Say, the content of value is 0x684539Af, in binary b01101000010001010011100110101111
This line
uint32_t detail = (value >> 12) & 0xFF;
does first shift the bits to the right by 12 bits, so the binary value is b00000000000001101000010001010011.
Then that value is masked by the AND operator using a mask with the 8 lowest bits set. The resulting binary value is b00000000000000000000000001010011 or 0x53.
I hope that helps :-).