Peer-to-peer network
Bitcoin is an open network all over the world. As long as you have a server, you can join this network and become a node. Each node contains the entire blockchain (currently about 100 GB), and the nodes are constantly synchronizing information.
When you make a payment, your node will tell the transaction to another node until it spreads throughout the network. Miners collect various new transactions from the Internet and package them into the blockchain. Once the writing is successful, the blockchain of the node where the miner is located becomes the latest version, and other nodes will copy the newly added blocks to ensure that the blockchains of the entire network are consistent.
Finally, the node you are at also got the latest block chain, so you know that your earlier transaction has been written in it, and the transaction has been confirmed successfully.