The behavior of pipe flow is governed mainly by the effects of viscosity and gravity relative to the inertial forces of the flow. Depending on the effect of viscosity relative to inertia, as represented by the Reynolds number, the flow can be either laminar or turbulent. For circular pipes of different surface roughness, at a Reynolds number below the critical value of approximately 2000 pipe flow will ultimately be laminar, whereas above the critical value turbulent flow can persist, as shown in Moody chart. For non-circular pipes, such as rectangular ducts, the critical Reynolds number is shifted, but still   depending on the aspect ratio. Earlier transition to turbulence, happening at Reynolds number one order of magnitude smaller, i.e. , can happen in channels with special geometrical shapes, such as the Tesla valve. 
Flow through pipes can roughly be divided into two:
*Laminar flow - see Hagen-Poiseuille flow
*Turbulent flow - see Moody diagram