Checks will usually clear your bank within 2 to 3 days of writing the check.
So once someone cashes or deposits your check then the funds will usually come out of your account within 2 to 3 days but sometimes the funds may come out of your checking account the same day the check is cashed.
It just depends on the bank and if you write a check for a store such as Walmart the funds will be immediately taken from your checking account through an electronic debit machine that the check is ran through.
So if you don't have the funds in the bank to cover the check then the check will be declined at the store.