How Is a Merkle Proof Generated from the Tree?
A Merkle Proof is generated by collecting the necessary "sibling" hashes at each level of the tree, from the transaction leaf up to the Merkle Root. These sibling hashes are the ones needed to be concatenated and re-hashed with the transaction's path hash to eventually match the Merkle Root.
The proof is a small list of hashes that validates the path.