As the question does not state the name of the technology, we shall go forward considering Blockchain. A transaction is grouped together in a block. The block is verified by PoW and links to the last verified Block to become a part of the chain hence Blockchain. The nodes maintain a copy of the ledger which gets updated after the verification process.
When a block is hashed with SHA256 it generated a 256 bit number with a certain number of 0 bits in front. A miner has to find the nonce to generate the valid hash. Depending on the requirement, a mining pool may or may not require to contain the full ledger.