RAM is required to store data on the blockchain and must be purchased. You get a set number of bytes of storage based on the current RAM market price. The price automatically adjusts up and down with buying and selling action. When you release storage you can sell RAM back to recover EOS at the current ram market price
Network Bandwidth is measured as your average consumption in bytes over the last 3 days. Net bandwidth is temporarily consumed every time you send an action or transaction but decreases over time returning to 0. The more tokens you stake for net bandwidth the more you get to use. You can unstake at any time to reclaim your EOS tokens.
CPU Bandwidth is measured as your average consumption in microseconds over the last 3 days. CPU bandwidth is temporarily consumed when you send an action or transaction but decreases over time returning to 0. The longer your transaction runs, the more CPU bandwidth it will consume. You can unstake at any time to reclaim your EOS.