The purpose of placing something in an ice bath is to cool it. In most cases, this will be done after the reaction or after redissolving a solid during the recrystallization. The lower temperature decreases the solubility of your compound. A period of 10-15 minutes is sufficent in most cases, especially if a significant amount of precipitate formed during this time.