Bandwidth and energy are like electricity and water for your house. Bandwidth is needed for all operations on the TRON blockchain while energy is only needed for Smart Contracts. You get 1500 bandwidth free every day, this is about 5 operations. To get more, you can freeze or burn TRX. Freezing TRX gets you X of each resource a day, and you must keep the TRX frozen(staked) for 3 days. At the end of 3 days you can unfreeze (unstake) your TRX and get it all back. If you do not have enough resources, you will burn TRX. Once TRX is burnt, you will not get it back.
You can obtain more energy and bandwidth here: https://tronscan.io/#/wallet/resources
To calculate energy and bandwidth consumption, visit our calculator https://tronstation.io/calculator
Energy: This is a special resource used to process smart contracts on the TRON network. Smart contracts consume Energy in addition to Bandwidth, so be sure you have enough of both when moving your tokens around! This is used for all SmartContracts (TRX20, TRC721, etc)
Bandwidth: Having TRON bandwidth allows you to perform transactions on the TRON mainnet without paying any gas fees. This is used for all transactions. (TRC10, TRC20, TRC721, etc)