How it works
Miners repeatedly hash block data until one finds a result below the network's target. The difficulty adjusts so that blocks arrive at a steady pace, about every ten minutes on Bitcoin.
Does it pay?
Profit depends on electricity prices, hardware efficiency, the coin's price and network difficulty. Large firms with cheap power dominate Bitcoin mining today, and halvings regularly squeeze margins.