Broadly, it is general revenue to the treasury. In this case, a chunk of it was allocated ahead of time. Congress passed (and the President signed) the "Middle Class Tax Relief and Job Creation Act of 2012." That legislation instructed the FCC to find spectrum in this set of bands to auction off, and allocated a portion of the proceeds to (a) defray the cost of moving the existing users of the spectrum and (b) building a public safety wireless network.
So, the FCC, while it conducts the auction, does so at the request of, and on the behalf of, Congress.
Usually it is a troubling sign for a government if they are selling off assets and still running a deficit. We see it when small local governments sell off buildings and then rent the very same building back from the person they sold it to. So that leaves the question: "Selling off the spectrum- good thing or bad thing?"