Federal Reserve Open Market Operations
The actual details of the auction and so on are interesting, but in principle there is no magic. Its just demand and supply:

There is a number of agents that can supply or demand treasury bonds as well as other bonds. There's the government that issues the treasuries, the Fed that sometimes holds them, sometimes sells them, investors of all kinds( brokers, pension funds, individuals, money market funds, etc). All these agents want to sell more if they deem the price high(rates too low) and they want to buy if they deem the price is low (rates too high). 

When supply shrinks, then agents that want to buy these assets bid up their prices (bid down the rates). similarly, when supply expands then the price falls (the rate rises) as the buyers bid down the  prices after observing the quantity.

To push up an interest rate, the fed will sell bonds. This will increase supply, until the price falls (i.e. until the rate rises).  To push down an interest rate, the fed will buy bonds. This will decrease supply, until the price increases (i.e. until the rate falls).


  I am curious, though: what if in the case of "raising rates", the Fed wants to sell securities but no bank wants to buy them? And, why wouldn't a bank buy securities anywhere else?


If no bank wants to buy the securities, but the fed is trying to sell them, then their price would go down, down, down, increasing the rate, until somebody wants them. If this rate is too high for the Fed, then it can instead buy these securities, lowering the market rate. In principle, if nobody wants to buy it means they are willing to sell, if nobody wants to sell it means they are willing to buy.

The banks can buy securities wherever they want, but the rates of all securities are closely related to each other. If the fed lowers rates on Treasuries, the rates on corporates, munies, etc, are all going to follow suit, at least to some extent. This is because the securities are all close substitutes of each other, so if you were thinking of buying a treasury, but its price increases, you go and, for example, you try to buy a muni, thereby increasing its price too.