A currency like ‘Bit-Coin’ has a network of peers. Each peer (known as miners) has a record of complete history of all transactions to balance all accounts. Here a transaction is a file. For example: A gives n bit-coins to B”. The entry is made with A’s private key. After the sign-in, the transaction is broadcasted in the network. This transaction needs time for confirmation. As long as the transaction is not confirmed, the transaction can be forged. Once the transaction is confirmed, no change can be made to the transaction and it becomes a part of block-chain.
Only miners can confirm these transactions on the crypto-currency. The miners are rewarded with crypto-currency for doing this confirmation. Bitcoins can only be created if mines solve a cryptographic puzzle, and the difficulty level of the puzzles keeps on increasing. These currencies are secured by math and there is a very less probability of being compromised.