Let’s consider a simple example. Say you have $100 on deposit in your checking account. You deposit a check for $10. The bank credits the deposit to your account, showing a new balance of $110. However, since the check has not yet cleared, the “available credit” is reduced by the amount of the deposit, $10.
No money has been “deducted” from your account, but the check is only shown as a provisional credit until it clears. In the case of domestic checks, they should clear within 2–3 days maximum. (In most cases these days the clearing time can actually be measured in hours, but existing laws and bank regulations allow the banks a longer window for clearing, and since the aggregate amounts of money are so high, even for small banks, they take full advantage. Those small amounts, aggregated and left on deposit even at the low short term rates currently available, and even for “just a few days” means a considerable amount to their bottom line at the end of the year.)
As to why your overdraft would have occurred, that should only happen if you wrote your own check for an amount exceeding the $100 you already had on deposit.