Say you have a population of farmers that are very similar, to the point that we can think of them as largely homogeneous. In year 0 we record the agricultural productivity of 6% of the farmers. In year 1 we give pest resistant seeds to 1% (1/6th of the sample) for one year only and again record everyone's productivity. In year 2, we do the same thing with a different 1% getting free the pest resistant seeds . In year 3, we do it yet again with a third group of 1%. Further imagine that in the pests only attack in year 2.
In this world, agricultural productivity is going to be the same across the two groups in years 0, 1, and 3. Assuming no selection or other complex responses, only in year two will the productivity of the groups differ.
As I understand it, in a homogeneous Difference in Difference problem, we assume that the treatment effect (here getting the special seeds, which just as easily and legitimately could have been an intent to treat effect) is constant across time and groups (otherwise we are just investigating an average treatment effect), N.B. this problem doesn't have different groups. So if the productivity benefit on the treated group in year 2 was +30% to productivity, using all the years, and comparing them to the pre-treatment values, you'd get an average Difference in Difference treatment effect of about 10%. But, if we allowed for a heterogeneous treatment effect by year, we would see that the treatment effects would be +0%, +30%, and +0%.
Now, in this particular setting we may have enough periods, controls, and fixed effects that we can take care of this. Say, we could do a triple interaction with the presence of pests with the treatment year and the treatment population in that year. However, in more complex non-experimental settings, that won't generally be possible. We need a way to allow the effect of the treatment (or intent to treat) on the treated to vary across time and or groups. And that requires a model of "Difference-in-Difference” models with heterogeneous effects."
In a classic difference in difference model with one level of treatment and two time periods (pre- and post-treatment), we have a setup like this:
$$ y_{i,t} = \beta_0 + \beta_1 \cdot 1_{treat, i} + \beta_2 \cdot 1_{post, t} + \beta_3 \cdot 1_{treat, i} \cdot 1_{post, t} + \epsilon_{i,t}$$
The difference in difference estimator is $\beta_3$, the change in the difference in the two groups over time. In the pest problem, $\beta_3$ would be about 10%.
In our pest problem, if we wanted to do this as a triple interaction instead:
$$ y_{i,t} = \gamma_0 + \gamma_1 \cdot 1_{treat, i} + \gamma_2 \cdot 1_{post, t} + \gamma_3 \cdot 1_{pest, t} + \gamma_4 \cdot 1_{treat, i} \cdot 1_{post, t} + \gamma_5 \cdot 1_{treat, i} \cdot 1_{pest, t} + \gamma_6 \cdot 1_{post, i} \cdot 1_{pest, t} + \gamma_7 \cdot 1_{treat, i} \cdot 1_{post, i} \cdot 1_{pest, t} + \zeta_{i,t}$$
When we estimate this equation, $\gamma_4=0$, but $\gamma_7=0.3$.
The alternative, and probably more common setup, is to do it like this (as I understand it, this is a version of what the linked author does):
$$ y_{i,t} = \alpha_0 + \alpha_1 \cdot 1_{treat, i} + \alpha_2 \cdot 1_{i-ever-treated} + \sum_{k=1}^T \alpha_{2+k} \cdot 1_{i-treated-in-year-k} \cdot 1_{t=k} + \xi_{i,t}$$
This gets you time varying DiD treatment effects by looking at the values of $\alpha_{2+k}$. This is more common because we don't always have a hypothesis of how the DiD effects will vary over time, and so we don't know what moderating variable to use in the interaction in the second equation. Or sometimes we expect a treatment effect to build or shrink over time, but we want to know the speed and strength of that change for its own sake.