The bank account example is a simple smart contract to which you can deposit and withdraw Ether. A contract is deployed per bank account, and that bank account will only allow withdrawals to the creator of the contract. Anyone can deposit Ether.