This is called open market operations, they do this to increase the money supply, buy buying bonds or decrease the money supply by selling. They do this to control interest rates and inflation.
Specially the Fed is responsible for: formulating monetary policy; acting as lender of last resort for the nation's banks and depository institutions; facilitating the collection and clearance of...