Duration calculates the weighted average timing of the cashflows of an instrument, weighted by the present values of the cashflows.
Two forms of the duration measure are Macaulay (or Macaulay's) duration (which is simpler) and Fisher-Weil duration (which is more refined).
Macaulay duration assumes a flat yield curve - in other words the same yield (to maturity) for all maturities of cashflow.
Fisher-Weil duration is a refinement of Macaulay duration which takes into account the term structure of interest rates (the yield curve).
Fisher-Weil duration calculates accordingly the present values of the relevant cashflows (more strictly) by using the zero coupon yield for each respective maturity.
This refinement is particularly important when the cash flows are longer term and when yields vary significantly for different maturities.