The Formation of stars: From clouds to cores