Metamorphosis and Recruitment back to Reefs
Assuming that the fish does not starve, get eaten, or become lost on the wrong ocean currents, near the end of its larval duration it begins searching for a suitable reef upon which to settle (or recruit). It might return to the reef where it was spawned, or it might find a completely different reef far from where it started. It all depends on the patterns of the currents.
Once it finds a suitable reef, the larva undergoes an extremely rapid transformation (or metamorphosis) into a juvenile stage that resembles a miniature adult. This typically occurs overnight, and the change can be quite dramatic. For example, larval flounder have an eye on each side of the head like other fish; during metamorphosis, one eye migrates over the top of the head and to the other side so that both eyes are on the same side, as in flounder adults, all within twelve hours.
Some species can delay metamorphosis for a limited time and remain in the larval stage if a suitable reef is not immediately found, or if timing with external cycles is not quite right - many reef fishes have a lunar cycle pattern to both spawning and recruitment. Once they are able to settle (have reached settlement competency), they delay their growth rate as they continue to search or wait. As the delay lengthens, the fish's quality standards for what constitutes "suitable" will go down.
Once they have settled, juvenile reef fish remain at their chosen reef, or part of reef, for the rest of their lives, where they spawn to begin new life cycles.