It depends on the particular ecosystem and why and how it was destroyed. It can take just 2 years or over 100 years depending on the different factors. Sometimes ecosystems never recover.
Natural selection is the idea that species that acquire adaptations favorable for their environment will pass those adaptations to their offspring. Eventually, only individuals with those favorable adaptations will survive.