Do banks pay for deposit insurance?
There's additional information in this answer, but in the US, banks pay into the FDIC Deposit Insurance Fund, and regulation and capital requirements are used to stop banks from taking excessive risks with deposits. In the event of a bank failure, depositors below the insured limit are repaid in full, but equity-holders are generally wiped out and other creditors must often take losses as well. 

The DIF premiums do vary somewhat with risk (see page 2 here):


  The FDIC charges premiums based upon
  the risk that the insured bank poses, and it inspects, or examines, banks to further manage that
  risk.