Stalin was a great admirer of Lenin's from his days as a student at seminary school. After leaving school he became (after a short spell working at a meteorological site) a full time revolutionary in Georgia. Lenin admired the Georgian party - it was ruthless, daring and provided the party with a lot of funds. Stalin also wrote on a few Marxist questions that got him noticed by the party in Exile.
After he had been released for exile, Stalin was chosen as one of the Georgian representatives of the party to attend the Bolshevik conference held in Finland in 1905. It was here that he first met Lenin. Lenin was impressed that Stalin stood up to him and argued with him on matters of Marxist doctrine. The connection continued when Lenin was exiled in London at the 1907 Party conference.
After the February Revolution, Lenin understood the need for decisive, strong, ruthless and daring people. After the "July Days" when the Bolsheviks failed to seize power, Lenin relied on Stalin to help him escape the country. During the October Revolution Stalin was again poised ready to help him flee if things did not work out as Lenin planned.
Their working relationship after the Revolution was never particularly close. Lenin grew to distrust him, and to dislike his crude, back-street ways, so he gave him the post that he thought would prevent him from gaining any political power - General Secretary of the Party.
Lenin had a stroke in 1922 and was confined to a country house about 20 miles from Moscow. Stalin, as General Secretary, was given the task of ensuring that Lenin was not too disturbed by political infighting - meaning that Stalin controlled who saw Lenin, which letters Lenin read, and, more importantly, what the Politburo read from Lenin.
About the Author
Stalin was one of the seven members of the first Politburo, founded in 1917 in order to manage the Bolshevik Revolution, alongside Lenin, Zinoviev, Kamenev, Trotsky, Sokolnikov, and Bubnov.