Gas units × gas price = fee.
Gas measures computational work on Ethereum. Gwei is a denomination of ETH: one gwei is one-billionth of an ETH. Multiplying gas used by the effective gas price gives the transaction fee in gwei; dividing by one billion converts it to ETH.
Why this is only an estimate.
The inputs here are yours. Gas actually used can differ from a transaction's gas limit, and the effective gas price can differ from the maximum fee a wallet allows. A contract interaction may use more gas than a basic transfer. A failed transaction can still consume gas.
For a current, provider-suggested gas price, use the optional network pulse. Review the final details in the application you use to send a transaction.