What is the role of bitcoin wallets?
A wallet is merely a collection of pairs of private/public keys. Every normal Bitcoin address is just a hash of a public key. The corresponding private key is needed to sign transactions that spend coins from the address.

So wallet security really is all about protecting your private keys - making sure you have access to them, and nobody else does. There are several ways to do this. A basic client software manages a wallet file for you and uses the keys within to sign transactions.

There are more advanced address that correspond to multisig or other scripts.

Re mining - almost true, instead of the miner finding the most complex block winning, every miner finding a sufficiently difficult block is rewarded. What is considered "sufficiently difficult" changes periodically.