The friction factor is used to calculate the pressure drop due to the flow of a
fluid in a pipe. It represents the interaction in between the fluid
and the pipe. One must be extremely careful when consulting
literature for correlations as the nature of the friction factor
used in not always very well apparent. It can indeed be expressed
according to Moody or to Fanning, with a factor 4 in between both
coefficients.

Figure 1 : Friction at the pipe interface
fMoody = Moody's friction factor
fFanning = Fanning's friction factor
Note that Moody's friction factor is sometimes called Darcy or Darcy-Weisbach friction coefficient.
Fanning or Moody friction factors can be calculated thanks to abacus (Moody diagram for example) or correlations, for example the Churchill correlation.

Figure 2 : Moody diagram, please click to get more explanation and bigger diagram