Solana Transaction Fees Explained: Base Fee and Priority Fee

A Solana transaction fee has two parts. The base fee is fixed at 0.000005 SOL for each signature on the transaction - usually one signature, so usually a fraction of a cent. The priority fee is optional, and it is what you offer on top to be processed sooner when the network is busy. Together they leave an ordinary transfer or swap costing well under a cent, which is why fees are rarely the thing people notice about Solana.
What the base fee pays for
It pays a validator - one of the computers that run the network - for checking your signature and writing the outcome into a block. It is charged whether the transaction succeeds or fails, because the work happened either way. Compare that with Bitcoin or Ethereum, where the whole fee floats with demand and can run from cents to many dollars. On Solana the base part does not move with the crowd.
When the priority fee matters
Most of the time it does not. During a busy spell, though, blocks fill up and validators work through the transactions offering more first, so one sent at the default can wait and then expire. Moving the setting in Phantom or Jupiter from normal to fast adds a tiny amount and makes a large difference to whether your swap lands. It is next-day delivery: worth paying for on the day you need it, wasted the rest of the week.
The cost that is not a fee
The first time you receive a new token, roughly 0.002 SOL leaves your balance to open an account for it. That one is not a fee. It is a deposit the network holds while the account exists, and it comes back if you ever close the account. It still catches people out, because it is several hundred times the size of the fee sitting next to it.
Keep a small working float of SOL - a tenth of a coin covers a great deal of activity - so you are never stuck holding a token you cannot afford to move. Priority fees and compute units explains how the second part is calculated, and why a failed transaction still costs money covers the question people ask most.