Two or more photos are taken, each with a different exposure value -- ranging from underexposed, properly exposed to overexposed. Some situations suggest that I take a wider variety of photos, from the very dark to the very light. I am still learning how all this works -- perhaps it's unknowable.
I don't really care or need to know all of the details about how it works, I am just happy when it does. As much as anything I am quickly learning what sorts of situations don't work where certain factors such as subject, colors in the scene, the angle of the sun or type of sky produce yucky results. (That's a technical term I picked up in 1954.)
I had practiced enough to know that I wanted to make the best use of the very long shadows, as well as the golden lighting in the background clouds. This wouldn't be the same photo without either of those details present -- in fact, experience would have told me not to bother. (Also, I set the camera very close to the ground in some of these to maximize the impact of the long shadows.)
Once the photos are merged I am then able to select pre-programmed adjustments, make no further adjustments, or apply the settings that I think will provide me the best final photos.