A miner is not solving a secret formula
A block header contains, among other fields, the previous block hash, the transactions' Merkle root, a timestamp, the target encoded as bits and a nonce. The miner changes the nonce and other adjustable data and repeatedly hashes the header. A valid result must be numerically less than or equal to the target required by the network rules.
A cryptographic hash behaves unpredictably after even a small input change. There is no known shortcut that reveals a successful nonce in advance; the miner tests a great many possibilities. Once one is found, however, a node hashes the submitted header and checks the condition directly. This asymmetry between expensive search and cheap verification is the core of the mechanism.
Work anchors a new block to history
The hash of the previous header is part of the next header. Changing an older transaction would change its Merkle root, the block hash and the references in every later block. An attacker would have to recreate the proof of work for the changed block and catch up with the work the rest of the network continues to add.
Proof of work therefore does not make the past mathematically immutable. It makes alteration measurably expensive, and the chance of catching up falls as more work accumulates after a confirmed transaction, provided the honest part of the network retains the advantage. Confirmation count is a practical indicator of accumulated protection, not an absolute guarantee.
- changing a transaction changes the commitment in its block header
- changing an old block requires rebuilding the following branch as well
- nodes compare accumulated work only among chains that satisfy their validity rules
Proof of work resists a cheaply fabricated majority
In an open network, one person can create thousands of identities or nodes. Counting IP addresses or usernames would therefore make a weak voting system. Proof of work ties the production of history to real computational resources that cannot be multiplied merely by copying an identity.
Work does not decide who is morally right, and it does not define the validity rules of a transaction. A miner could find a hash for a block containing unauthorized inflation, yet full nodes would reject it. Proof of work addresses ordering and the cost of competing histories; node validation determines whether a block follows the agreed rules at all.
Energy is both a feature of the mechanism and a subject of dispute
Hashing attempts consume electricity and require hardware. It is inaccurate to say that proof of work is costless or that consumption automatically proves Bitcoin's social value. The mechanism deliberately makes a competing history expensive, and security arises precisely because the required resources have a price.
Whether that price is justified cannot be settled by describing the protocol alone. A sound assessment must compare consumption, energy sources, emissions, security benefits and available alternatives. The narrower technical fact is that a node can verify the required work from a header without repeating the search.