The Bitcoin network has never been hacked. The network's open-source code has been reviewed by numerous security experts and computer scientists. Bitcoin was also the first digital currency to solve the double-spend problem, allowing for the existence of peer-to-peer currencies with distributed trust. In addition, all Bitcoin transactions are irreversible.
Reality
Many misconceptions about the security of Bitcoin come from attacks on third-party companies and services that use Bitcoin, not from the Bitcoin network itself. Large attacks by hackers on early Bitcoin companies that had security flaws (such as the Japanese exchange Mt. Gox) and occasional data breaches (such as the one that hit the Ledger wallet provider) have led some people to question the security of Bitcoin.
The Bitcoin main protocol has been running securely, with 99.9% uptime, since its creation in 2009. The security of the network is guaranteed by immense computational power. In addition, the miners that power the network are distributed all over the world, which means there are no single points of failure.