When a public company issues new shares it needs to know how much money it will raise. In an open market there is no way of knowing this for sure as on the offer day there may be more or less demand for the shares and this will influence the number sold. One common way to guarantee a minimum level of proceeds is for the issuing firm to involve an underwriter.
This is usually an investment bank, such as JP Morgan or Goldman Sachs. In exchange for a fee – usually a percentage of the amount raised – they commit to buy up any shares that are not taken up on the offer day by other buyers. As such they are acting as a kind of insurer, hence the term underwriting. In most cases the bank will hope to take the fee and not have to buy any shares, assuming an offer is popular. However, if the issue price is too high they may end up owning a block of shares.