Cryptocurrency transactions are recorded in a digital spreadsheet called a blockchain. This prevents double-spending and is maintained by a network of incentivized miners.
Mining can be very profitable but requires specialized hardware that uses large amounts of electricity. That’s why many miners are located in countries with cheap energy prices.