So, what are blockchains?
Blockchains are basically a bunch of hashes, with the hash of the last "block" being used to calculate the new block. The first block is called the Genesis block. So if I had 3 blocks, 1,2 and 3, if I changed the ownership block number 2 to myself, the hash of block number 2 would be recalculated.
Let's say we make a sha256 hash with owner: someone else.
It's ee975f0cd82647753dcd9928b357e2ccd40f4c88a543817d887edceb0f9548e7.
Now the next one is owner: me with ee975f0 as part of the original hash.
It's 026a30b55b6f1bb80caa96c97f274de4ffe7b50c0a0916cd7aea77ce0f024c91.
And I want the first block. So I change it's owner to me.
And now it's hash is dd3fc45071d123d6aa3e591936b08a1a0f31d00e9f547365adf4b012fe877cf0.
Problem is, the second hash is also calculated with part of the last hash. And you've changed it from ee975f0 to dd3fc45. And the second block needs to be recalculated to 70e981e1a58c840a54a735abf6106076d08db325080817b330bd86b8f057a197.
And so on and so forth.
If you wanted to change all the blocks to give them to yourself, you'd have to recalculate the whole blockchain.
But since there's no guarantee that nobody has a supercomputer in their house doing that, A proof-of-work algorithm was implemented. All it does is to slow down things so it takes longer to find a block.
And just in case there's someone sitting in their house with a supercomputer (or an ASIC) and lots of time to spare, the network effect comes in.
Everyone who downloads the wallet or directly downloads the blockchain has a copy of the blockchain on their computer. So does mining.
After a block is found, it and the rest of the blockchain is sent to other computers to check if the other hashes have been tampered with. If there are no hashes that have been tampered with, and the new block corresponds to the last block, the new block is added to the blockchain.