The Darcy Friction Factor is used when solving the Darcy Weisbach Equation, one of the three commonly used relationships for determining hf due to the flow of fluid through pipes. The resultant friction factor is determined based on what type of flow you're dealing with (by using Reynolds Number) and also what type of pipe you're dealing with.
How to solve for the Darcy Weisbach Friction Factor:
The Generic Term for the Darcy Friction Factor is: f = f \left(\frac{e}{D} , Re \right)

where:
D = diameter of pipe
e/D = relative roughness of the pipe
How to Determine Friction Factor:
Moody Diagram
One way to determine friction factor is to use Moody's Diagram. Pressure drops seen for fullydeveloped flow of fluids through pipes can be predicted using the Moody diagram which plots the friction factor(f) against Reynolds number (Re) and relative roughness (ε / D). The diagram clearly shows the laminar, transition, and turbulent flow regimes as Reynolds number increases.
To use the Moody diagram to find the friction factor, choose the curve for a specific relative roughness. Follow the curve (you'll be starting from the right) and stop when you get directly above the Reynolds Number (shown on the bottom) or direcly below VD (shown on the top and only applicable if the water temperature is 60F). Go straight to the left axis and the value read is the appropriate friction factor.
Tables
Tables are another common method of finding the friction factor. The CERM Appendix 17.B (starting on page A27) lists friction factors for various Re and e/D.
Equations:
The friction factor can also be determined by equation depending on condition of the flow as shown in the following table:
Table 1: Equations to solve for Darcy's Friction Factor  
Type of Flow  Range of Application  Solving for f 
Laminar  Re < 2000  f = \frac{64}{Re} 
Hydraulically Smooth or Turbulent Smooth  4000 < Re < 100,000  f = \frac{0.316}{Re^{0.25}} 
Re > 4000  \frac{1}{\sqrt{f}} = 2log_{10}(Re \sqrt{f} )  0.8  
Transition between Hydraulically Smooth and Wholly Rough  Re > 4000  \frac{1}{\sqrt{f}} = 1.142log_{10} \left(\frac{e}{D} + \frac{9.35}{Re\sqrt{f}}\right) 
Hydraulically Rough or Turbulent Rough  Re > 4000  \frac{1}{\sqrt{f}} = 1.142log_{10} \left(\frac{e}{D}\right) 
where:
Note: In situations where Re falls between 2100 and 400 (an area between laminar and turbulent flow) eddies will be present which cause critical flow. It is difficult to design for this region since fluid behavior is not consistent.
SwameeJain equation:
For fully turbulent flow, the SwameeJain equation^{[1]} can be used to solve for the friction factor. The Swamee–Jain equation is used to solve directly for the Darcy–Weisbach friction factor f for a fullflowing circular pipe. It is an approximation of the implicit Colebrook–White equation.
f = 1.325\left(ln \left(\frac{\frac{e}{D}}{3.7} + \frac{5.74}{Re^{0.9}} \right)\right)^{2}