Underwriters are municipal securities dealers: they help governments sell municipal bonds. To do this, they (or sometimes a single underwriter) will purchase the bonds from a municipality, then turn around and sell bonds on the municipal market.
Underwriters are paid by a fee from governments and will usually take a cut of the bond sale.
Underwriters and municipalities negotiate what the terms of the deal will be. Typically this will include the interest rate of the bond, the term (life of the bond) and the initial offering price. In a competitive sale (versus a negotiated one), underwriters bid on the chance to work with a municipality, which then chooses the best deal.