Kievan Rus began to fragment over time. This happened for a number of reasons, among them odd succession rules (where the oldest member of the ruling familiy became the new Grand Prince as opposed to the oldest son of the previous prince) and geography. Dynastic struggles and civil wars eroded the power of the Grand Prince in Kiev, and other regional powers began to emerge. On paper, Kiev was still the capital and the seat of power of the Grand Prince, in reality regional princes exercised practically complete independence. In mid 12th century, Prince of Vladimir-Suzdal (a principality to the neartheast of Kiev, where Moscow now is) by the name of Yuri Dogorukiy captured Kiev, even further diminishing its power. Yuri also happed to found Moscow which was then just a small fort.
In 1238, Mongols invaded Rus and destroyed many old Rus cities, including Kiev, Vladimir, Suzdal, Cheringov and many others. Kievan Rus essentially ceased to exist in any meaningful sense. The Mongols ruled by proxy, usually appointing a Grand Prince to collect tribute. Their appointments were usually strategic, in order to keep Rus from consolidating. During these years of the "Mongol Yoke" Moscow began to gain prominence. In fact the Mongols often favored Moscow princes as a reward for their loyalty to them. Kiev on the other hand continued to fall into decline, eventually becoming a part of the growing Lithuania. As the power of the Golden Horde (the Mongol/Tatar state) declined in the late 14th century, Moscow emerged the regional power and a rallying city for anti-Mongol resistance. Through deft politics, strategic marriages and alliances, and sometimes outright military strength, Moscow gained more and more of the former Rus land, eventually ruling over all of it, except what was now part of Lithuania.
In 1097 the princes of Rus agreed to split their lands into separate domains for each branch. Before that, the so-called rota succession meant they would have to switch their lands every time one of them died. After that, only Kiev was to be given to the seniormost member of the dynasty, all other lands (with three exceptions) were partitioned among the Rurikid branches. Some branches kept using the rota system to manage their familial lands, some didn't.
By the time the Mongols invaded, there were four to six familial lands in Kievan Rus: Vladimir-Suzdal, Volhynia, Smolensk and Chernigov. Turov and Ryzan were less important, Polotsk was technically independent.
When Mongols invaded, they became the sole source of authority, appointing local rulers according to their own preferences. Thus, the throne of Kiev lost its prestige, since you weren't guaranteed to get it even if you were the oldest and you could no longer influence local politics. It became much more important to get your local yarlig from the khan.
Lands which were part of the modern Ukraine were less lucky than Vladimir-Suzdal. Chernigov had many steppe lands that had to be handed over to the Mongols and its rulers backed the wrong side in one of the intra-Mongolian conflicts, Volhynia was the westernmost principality and the Mongols often used its armies to attack Poland and Hungary. Later their dynasty ran out of heirs and was taken by Poland.
Moscow was one of the smaller principalities of Vladimir-Suzdal that managed to unite Vladimir-Suzdal and beat back the Mongols. A.A. Gorskiy supposes that when Moscow and Chernigov backed the wrong man (I think Nogay), Chernigov was ravaged by the Mongols and many boyars started looking for a new suzerain. Daniil of Moscow was the closest friendly prince, so he suddenly had a large army to strong-arm his neighbors with.
The lands of modern Ukraine, having no strong local rulers left, were conquered by Lithuania, then transferred to Poland and finally taken from Poland by Russia. However, its westernmost part became part of the Austrian Empire, which supported historians like Grushevskiy who considered Ukrainians a separate nation, while Russian Empire of course supported historians who considered Ukrainians a southern branch of Russians.
Sources: several books by A.A. Gorskiy, M. Grushevskiy.
Ivan IV (the Terrible) of Muscowy crowned himself the Tsar of Rus' in 1547, laying thus claims on Kiev and on other Rus territories which since the 14th century were under the control of Poland-Lithuania. The state historians call "Kiev" Rus' effectively ceased to exist after the Mongols annihilated Kiev in 1240. Moscow was at that time a village on it's north eastern rim. Kiev was conquered by the Lithuanians while Muscowy remained amongst the vassals of the Golden Horde until throwing off the yoke in the Grand Standing at the Ugra River of 1480.
source: The History of Russian Statehood by Nikolay Karamzin.