I couldn't readily find it last time I looked, but I know some of what I know from reading up on how volcanic islands develop ecosystems.
They rise up out of the water due to volcanic activity. This creates a small resting place for migrating birds.
Birds poop on them, adding nutrients to volcanic rock and also leaving behind seeds from things they've eaten. Many fruits are DESIGNED to spread their seeds to new places via birds or other animals eating the whole fruit and pooping out the seeds elsewhere.
This is especially common with birds because they have no teeth, so they don't grind up the seeds and damage them. They swallow a lot of seeds whole.
These seeds bloom and are the start of an ecosystem.
Coconuts can float long distances in salt water, land on such an island and still be viable. So the first trees are usually coconut trees.
Hurricanes or similarly powerful storms may bring bugs, such as flies, that wouldn't have been able to fly that far on their own efforts. They breed and diversify from there over many years, creating a separate species due to long-term isolation.