well, as its called investment.
You invest for their project by buying their tokens and the value of tokens would be proportional to profit of the project.
Most of the ICO's are profitable as their price would increase on reaching the market.
But some of them are total scams which would lead your investment to nothing.
So, study about the project before investing.