The benefits associated with increased government spending funded by borrowing money may be offset by reduced consumption and investment if this reduces the credit available to firms and individuals.
Below is a diagram to illustrate the crowding-out effects of financing a budget deficit. When the government wishes to finance a budget deficit they have to borrow from the private financial sector. By doing this it pushes the demand for loanable funds outwards putting presurre on interest rates to rise. Given that investment is a component of aggregate demand and is negatively related to the interest rate (as the interest rate represents the opportunity cost of investing), a higher interest rate causes individual investment projects to be less profitable and therefore investment falls. Also given the fact that interest rates are higher it makes consumption lower due to difficulties trying to acquire finance from financial institutions. Therefore despite the government stimulating the economy by running a larger budget deficit the effect on real output will be muted due to lower consumption and investment offsetting these expansionary effects. This is shown by the position of the final AD3 curve.