Orome rode back to Valinor with news of the Quendi's awakening and the other Valar were happy to hear about them, but they also worried about the Quendi being alone in Middle Earth, vulnerable to Melkor's evil.
After much discussion, it was decided that the Valar would come to Middle Earth and make war on Melkor, so that he would be defeated and the Quendi made safe. This they did, and the battles were apparently astounding in their violence, for many of the mountains and valleys of Middle Earth were formed by those battles.
After the battle, when Melkor was taken away to Valinor in chains, the discussion of what to do about the Quendi came up again and the majority of the Valar decided to convince the Firstborn to leave Middle Earth and come to the protected land of Valinor. (Sure, Melkor was imprisoned, but he left a lot of evil creatures behind in Middle Earth.) The most notable dissenter from this view was Ulmo, Lord of Waters, who thought it best that the Elves remain in Middle Earth.
Some of the Elves were eager to go on the trip, some hesitant, but still willing, and some were entirely against the idea of journeying across the whole of the land for a "promise" of Valinor. (Note: the terrible battles were the first the Quendi had seen of the Valar, except for Oromë, so many were more than a little frightened of them.)
This last group, who decided to stay in Middle Earth and not make the Great Journey, were named by the Valar, the Avari, which means "the unwilling." They remained behind the rest, taking to the mountains and woodlands of Middle Earth and much of their history after that is unknown.
From then on, only the Quendi who had decided to go on the journey to Valinor, were called the Eldar.
- It is believed that the Avari, because they did not have the Valar as teachers, as most of the other Elves did, were a bit more "uncivilized" and less learned than those of their kin who went on the Great Journey.
Summary: The Avari are all those Elves who refused to go on the Great Journey. Any Elves who set out on it, even if they did not end up going all the way, are Eldar and not Avari.