The bounty system is common to all Stack Exchange sites, and here is the Help Center page on bounties. I'm going to quote a couple parts to answer the questions you had here.
All bounties are paid for up front and non-refundable under any circumstances.
How is a bounty awarded?
The bounty period lasts 7 days. Bounties must have a minimum duration of at least 1 day. After the bounty ends, there is a grace period of 24 hours to manually award the bounty. Simply click the bounty award icon next to each answer to permanently award your bounty to the answerer. (You cannot award a bounty to your own answer.)
If you do not award your bounty within 7 days (plus the grace period), the highest voted answer created after the bounty started with a minimum score of 2 will be awarded half the bounty amount. If two or more eligible answers have the same score (i.e., their scores are tied), the oldest answer is awarded the bounty. If there's no answer meeting those criteria, the bounty is not awarded to anyone.
If the bounty was started by the question owner, and the question owner accepts an answer posted during the bounty period, and the bounty expires without an explicit award then we assume the bounty owner liked the answer they accepted and award it the full bounty amount at the time of bounty expiration.
And finally, the question is not auto-closed for not awarding a bounty. For any reason, in fact. I hope that answers your questions satisfactorily.