Origin and evolution of planets, atmospheres and hydrospheres