I know it's somewhat controlled by what the Fed sets interest rates at. I'm not clear on what exactly this interest rate is. Also I have heard that mortgage interest rates track Treasury Bonds. Where does this come into play?
Mortgage or other interest rates are determined by the banks on cost of funds, risk and operating cost.
The Fed raises money from the markets by issuing Treasury Bonds at a specified rate. This rate at which it raises money varies depending on the economy.
Thus there are 2 rates: the rate at which banks can borrow money from the Fed, which is higher than the rate that the Fed would give banks for excess money deposited with them.
So if the cost of borrowing is less, banks can borrow this money from the Fed and loan it to individuals at a slightly higher rate that would cover their costs plus a small profit. The risk associated with a mortgage is less, and hence these would be cheaper, then say a personal loan.
If the cost of borrowing goes up, the mortgage rate will go up. If the cost of borrowing money goes down, the cost would come down.
Banks may not always borrow money to lend. If they have existing money, they can either park it with the Fed for a lower interest rate, or loan it to individuals for a rate higher than what they would have received from the Fed.
One will find that the fixed 30 year mortgage rate is tightly correlated to the 10 year treasury. An adder of 2-2.5% or so, changing slightly with the rest of the economy, as money can get tight or loose independent of the rate itself. In 2011 we are witnessing low rates yet tough loan standards, this is the phenomenon I am referencing.
Sheegan has a great explanation of how the TBA market contributes to mortgage rates.
The 30 Year Mortgage rates are closely tied to the 10-Year Treasury. One can track this rate at many stock quoting sites using symbol TNX.