When user A sends Bitcoins to user B, user A signs the transaction with his private key. This signed transaction is being sent to the Bitcoin network and all the nodes collect, confirm and pack these transactions to blocks by mining. Is that right so far? But what exactly happens at the confirmation. What are the nodes doing? I can't imagine what confirmation means technically. Does the transaction contain the public key and the nodes look if they can decrypt the transaction with this public key or what?
And what does it mean to wait 6 confirmations or more? (see http://bitcoin.org/en/vocabulary#confirmation). Why should one wait for a confirmation and how can one decide how many confirmations to wait? This is very unclear to me (Bitcoin newbie). The tooltip here tells me "the more confirmations a transaction has, the more likely that it will remain in the chain permanently". Why do I want my transaction to remain in the chain?