The first fossil record was that of the polychaeta Canadia found during the Cambrian and late precambrian ( http://en.winipedia.org/wiki/Annelids ). According to http://en.wikipedia.org/wiki.annelids/Annelida.htm , there were several likely appearances of polychaetes during the Ordovonian (that of Serpulidae, Spionidae ). The Ordovonian also marked the Eunicida radiation.Thus by the end of the carboniferous, most polychaete lineages had appeared.
The annelids are thought to have evolved from and be closely related to the arthropods ( http://en.wikipedia.org/wiki/Annelids ) because of shared segmentation. However recent molecular data suggest that the shared segmented character of these two groups may be due to convergence rather than a sign of homology. Thus, this shared segmentation is due to shared functional requirements of these two groups rather than indicating common decent.
Recent molecular evidence suggest that annelids are closely related to the mollusks because they both have trochophore larvae as a developmental stage in their life cycle ( http://en.wikipedia.org/wiki/Annelids ).
The large success of the annelids can be contributed to the fact that they are capable of both sexual and asexual reproduction. Asexual reproduction and regeneration during injury gave many species a competitive advantage over other species. Sexual reproducing species can be monocious or diocious which allowed these organisms the rapidly adapt to changing environmental conditions ( http://en.wikipedia.org/org/wiki.Annelids/reproduction ).
Presently, three major subclasses of annelids are distinguished, namely the oligochaetes (Oligochaeta), polychaethes (Polychaeta) and leeches (Hirudinea) ( http://en.wikipedia.org/wiki ). The polychaetes are mainly marine. They are adapted with parapodia containing bristles which are used in locomaotion and respiration. The polychaetes are free living or tube dwelling, while others can be commentially associated with other organisms ( http://en.wikipedia.org.wiki ). The oligochaetes (including terrestrial earthworms) have fewer bristles than polychaetes and also lack parapodia, which would not be of much use for life on land.The Hirudinea are thought to have evolved from detritus eating earthworms ( http://en.wikipedia.org.wiki ). These members of annelida can be parasitic or haemophagic parasites, feeding on the blood of vertebrates.
Despite the relative success of the phylum annelida, members such as the Lake pedder earthworm ( Hypolimnus pedderensis ) which were found mainly in Australia and Tasmania have gone extinct (http://www.redlist.org/search/details.php?species=6828). Members such as the Giant Palouse earthworm ( Driloleirus americanus) are currently vulnerable to extinction while member such as Hirudo medicinalis that is native to Europe are at low risk. Extictions are mainly contributed to habitat loss or degredation due to increased agricultural activity and infrastructure development (http://www.redlist.org/search/details.php?species=6828).