Miners in the Bitcoin network compete to solve a proof-of-work puzzle, which involves hashing transaction data using the SHA-256 algorithm. The winning miner is rewarded with a set number of bitcoins, known as the block reward. The puzzle is designed to require computational power and prevents double spending or tampering with transaction data. Mining ensures the validation of transactions and the minting of new bitcoins while also adding security to the network.