Could you please elaborate on the fundamental workings of a
Bitcoin wallet? Specifically, how does it facilitate the storage, transfer, and security of Bitcoin? I'm curious to understand the technical aspects behind it, such as how the wallet generates public and private keys, the role of wallets in transaction confirmations, and any security measures it employs to safeguard users' funds. Additionally, I'd like to know if there are different types of Bitcoin wallets and what factors should be considered when choosing one.