user75151: I have a basic question on Bitcoin and blockchain:
Sometimes transactions are confirmed almost instantly, but there should be a new block every 10 minutes, so how is it possible? A transaction can be confirmed only after being included in a block, right?
thanks!

user38176: A little more information is necessary to tell you exactly what happened to your transactions that were confirmed "almost instantly" but what you've said is correct:

The bitcoin protocol is such that new blocks should be mined, on average, every 10 minutes. 
A transaction is "confirmed" (has 1+ confirmation) only after being included in a block. Before this, the transaction is "pending". Some merchants require more than one confirmation for the transaction to be final, many choosing to wait for 3 confirmations before being deemed complete. 

However, the situation can arise where after publishing your transaction a block is then mined a few seconds later that has your transaction in it. This could give the appearance that your transaction was confirmed "almost instantly". 
Possible source of confusion: Blocks aren't mined 10 minutes after your transaction, they're mined 10 minutes (on average) since the previous block was mined. 

75151: <p>I have a basic question on Bitcoin and blockchain:</p>

<p>Sometimes transactions are confirmed almost instantly, but there should be a new block every 10 minutes, so how is it possible? A transaction can be confirmed only after being included in a block, right?</p>

<p>thanks!</p>
 38176: <p>A little more information is necessary to tell you exactly what happened to your transactions that were confirmed "almost instantly" but what you've said is correct:</p>

<ul>
<li>The bitcoin protocol is such that new blocks should be mined, on average, every 10 minutes. </li>
<li>A transaction is "confirmed" (has 1+ confirmation) only after being included in a block. Before this, the transaction is "pending". Some merchants require more than one confirmation for the transaction to be final, many choosing to wait for 3 confirmations before being deemed complete. </li>
</ul>

<p>However, the situation can arise where after publishing your transaction a block is then mined a few seconds later that has your transaction in it. This could give the appearance that your transaction was confirmed "almost instantly". </p>

<p>Possible source of confusion: Blocks aren't mined 10 minutes after your transaction, they're mined 10 minutes (on average) since the previous block was mined. </p>
