That's a bit of an open question; but it seems there are indications that it began very early; as much as 4 billion years ago. This is associated with new ideas about the "Hadean" (Hellish) era; it may not have been as diabolical as previously thought.
Here's an article from the NYT which discusses these ideas: A New Picture of the Early Earth
. The relevant science article is
- Hopkins, M. et. al. (2008) "Low heat flow inferred from >4 Gyr zircons suggests Hadean plate boundary interactions" in Nature 456, 493-496 (27 November 2008) doi:10.1038/nature07465
Cheers -- sylas