When an ICO is planned, the owners/managers set a final cap for how much they are looking to collect from investors. Once the Hard cap is reached, they will stop collecting funds and the ICO is over.
Hard Cap is the MAXIMUM amount, the ICO can end sooner of course, in case of lower interest for example.