The formation of the Earths core is a consequence of planetary accretion and processes in the Earths interior. The mechanical process of planetary differentiation is likely to occur in large, if not global, magma oceans created by the collisions of planetary embryos. Metal-silicate segregation in magma oceans occurs rapidly and efficiently unlike grain scale percolation according to laboratory experiments and calculations. Geochemical models of the core formation process as planetary accretion proceeds are becoming increasingly realistic. Single stage and continuous core formation models have evolved into multi-stage models that are couple to the output of dynamical models of the giant impact phase of planet formation. The models that are most successful in matching the chemical composition of the Earths mantle, based on experimentally-derived element partition coefficients, show that the temperature and pressure of metal-silicate equilibration must increase as a function of time and mass accreted and so must the oxygen fugacity of the equilibrating material. The latter can occur if silicon partitions into the core and through the late delivery of oxidized material. Coupled dynamical accretion and multi-stage core formation models predict the evolving mantle and core compositions of all the terrestrial planets simultaneously and also place strong constraints on the bulk compositions and oxidation states of primitive bodies in the protoplanetary disk.