Confirmation is defined as a type of proof that a transaction was recorded and verified on the blockchain. The higher number of confirmations, the more trusted that transaction is.
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.
The first confirmation comes when a block records your data. Every block recorded afterwards is counted as an additional confirmation.
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.