This equation is based on the law of conservation of mass. For a fluid flowing through the pipe having single inlet and single outlet, the flow rate of fluid at all the cross sections is constant.
i.e. mass flow rate at inlet = mass flow rate at outlet
(ρ A V)inlet = (ρ A V)outlet
If the fluid is incompressible then
(A V)inlet = (A V)outlet
Where ‘A’ is Area of cross section, ‘V’ is Velocity of fluid and ‘ρ’ is density of fluid.