Cooling – it should be done as fast as you can. Becouse the wort can get infected by microbes, so you can then just say bye bye beer. And the other reason is becouse of hop resins degradation.
Cooling can be done by Immersion Wort Chiller, Heat exchanger, or (for small batches) you can cool the whole fermentor in water or water/ice bath.
IMMERSION WORT CHILLER
Immerse it into the wort approximatelly 10 minutes before end of boiling (for disinfection), than plug it to cold water and start cooling. It is pretty useful, but it consumes much water. (That is why I made a system that does not use that much water).
It is more efficient than Immersion Wort Chiller. But usually more expensive also.
COOLING IN WATER/ICE BATH
Usually homebrew starters using this method. It is quite slow.