On a proof-of-work network, miners search for a block header that meets a difficulty target. Finding it takes many attempts. Checking it takes one. The cost, in equipment and energy, is what makes rewriting old blocks expensive. The hash rate is the pace of those attempts across the network.
The block’s reward is what pays for the work. If the reward does not cover the cost, some miners stop, and the protocol’s difficulty adjustment is designed to follow. That is a description of the mechanism, not a claim about which network is safest.
Bitcoin uses proof of work. Monero uses a different proof-of-work algorithm, built to be mined by general-purpose computers. See decentralized.