An affine gap penalty is assigned to gaps in an alignment (i.e., indels).
In such a penalty, a gap of length $L$ is penalized by $a + b \cdot (L-1)$, where $a$ and $b$ are constants
chosen in advance. These constants represent, the gap opening penalty ($a$),
which is charged for initiating the gap with its first symbol, and the
gap extension penalty ($b$), which is charged for each subsequent symbol added to the gap.

The affine gap penalty is analogous to paying a cable bill in which you need to pay a one-time installation
fee ($a$) and get the first month of TV free, followed by paying by a monthly charge ($b$).