So if the hard cap is reached during an ICO fundraising campaign, the tokens are considered as sold out for that particular round. In other words, it means that the maximum goal of the ICO event has been achieved and the developers are no longer accepting investor funds in exchange for project tokens.
The choice of how high to set the hard cap is completely up to the development team, with the need to balance the upper limit of the fundraising goal with the economic scarcity of the associated tokens (and its perceived worth).
While the hard cap defines the maximum number of tokens that can be sold during an ICO crowdfunding, the term soft cap refers to the minimum viable funding for a particular project to start its development. As such, the hard cap is normally set significantly higher than the soft cap, as it represents a fundraising goal rather than a minimum viable target.