A cashier's check is guaranteed by the bank issuing it. These checks are often used for large transactions, because the seller knows that when a buyer has a cashier's check, the funds are there. When you have a cashier's check drawn on your bank funds that you didn't end up using, and you want to deposit it back to the bank, it will depend on who the check is made payable to and what your bank's policies are regarding unused cashier's checks. No matter what, as long as you have the cashier's check in hand when you go to the bank, you will receive the funds assigned to the check, whether it's by deposit or a credit to your account.
Cashier's Check in Your Name
Take the cashier's check to your bank and go to a teller's window. Place the check face down on the counter, and write "For Deposit Only" on the back of the check in the endorsement area, followed by your signature to endorse it for deposit. Give the check and a completed deposit slip to the teller and wait for a receipt that confirms the deposit. Keep the receipt and check your bank account to confirm the deposit the following day. Cashier's checks are not held by the bank for verification, unless bank personnel suspect a scam is involved.
Unused Cashier's Check
Take the cashier's check to a teller window at the bank at which it was drawn. Inform the teller that you did not use the cashier's check as planned and you would like to receive the funds back into your account. Allow the teller to mark the check "Not used for purposes intended" and credit your account. Wait for confirmation from the teller that the funds have been credited. Again, check your account online the following day to confirm that the money is there.
When You Need a Stop Payment
Be careful not to lose your cashier's check during the time that it's in your possession, or you will have to ask the bank for a "Stop payment" on the check, which is often a fee-based service where the bank renders the check invalid. Finding an unused cashier's check is a thief's dream, so have the payment stopped as soon as possible.