Gas is the unit that measures computational work required to execute operations on Ethereum.
Every transaction or smart-contract operation consumes a specified amount of gas. Simple actions, such as transferring ether, require less gas than complex contract interactions. Users pay for this work with ether, Ethereum’s native cryptocurrency.
Gas is not itself a currency. Its price is quoted in smaller ether denominations, commonly gwei, while wei is the smallest denomination of ether. The total fee depends on both the gas used and the price per unit of gas.
Ethereum introduced this model to prevent programs from running indefinitely and to allocate limited block space. A transaction can fail because it runs out of gas, but the computational work already performed still consumes the supplied fee.