By using specific cryptographic techniques, one is able to send sensitive data even over unsecured networks with the rule that the level of encryption will depend on the degree of protection that the data requires.
Most blockchain systems, such as the one of Bitcoin, make use of a particular set of cryptographic techniques that allow them to function as a decentralized and public ledger, through which digital transactions can take place in a very secure way.