A zero confirmation transaction is defined as an exchange that has not yet been recorded and verified on the blockchain. Instead the seller immediately assumes he received his money and delivers what was sold.
A blockchain can be compared to a digital book that can record anything where each page in that book is known as a block. The blockchain is simultaneously maintained by a network of computers who must all agree on the data.
Any bad actor who wants to manipulate the blockchain would need to have at least 51% of the computing power of the entire network to make changes. In a big blockchain like bitcoin, that’s incredibly expensive and difficult.
After sending data to the blockchain, you have to wait for one of the computers maintaining the network to record and verify your data into a block. Because blocks are connected to each other, every block confirms all prior blocks. That means the longer the blockchain gets, the more secure earlier blocks are.
When using bitcoin, it is recommended you wait for at least 6 confirmations (5 blocks recorded after yours) before considering your transaction is permanent. After 6 blocks, there is less than a 0.1% chance your data will ever be altered.
The first confirmation comes when a block records your data. Every block recorded afterwards is counted as an additional confirmation.