In the case of Bitcoin, miners run computer programs to verify the data that creates a complete transaction history of all Bitcoin. A technology known as the blockchain, which is used to create irreversible and traceable transactions, makes the process of verification possible. Once a miner has verified the data (which comes in a block, hence, blockchain), they are rewarded with some amount of digital currency, the same currency for which they were verifying the transaction history. So mining Bitcoin, for example, would earn you Bitcoin.
When people talk about the price of Bitcoin, they are referring to the current price at which Bitcoin is changing hands. Since Bitcoin is a purely speculative asset, this price is determined by how little sellers are willing to charge and how much buyers are willing to pay. Even then, the price of Bitcoin can vary across exchanges like Coinbase and Binance or currencies because of market inefficiencies