A transaction is a file that says, “Bob gives X Bitcoin to Alice“ and is signed by Bob‘s private key. After signed, a transaction is broadcasted in the network, sent from one peer to every other peer. The transaction is known almost immediately by the whole network. But only after a specific amount of time it gets confirmed. As long as a transaction is unconfirmed, it is pending and can be forged. When a transaction is confirmed, it is set in stone.