The red guards of Bolsheviks took control over the city of Petrograd (with the leadership of Lenin), which led to a successful coup. That provided the opportunity to establish the USSR.
A civil war broke out in 1918 and lasted until 1921. It meant fight between the Bolsheviks and anti-Bolsheviks (red and white). In spite of the less soldiers the Bolsheviks had, they controlled the central parts of the country, which meant huge advantage.
Treaty of Brest-Litovsk
Russia signed the peace treaty of Brest-Litovsk with Germany in 1918, which meant they left the First World War and could focus on the internal affairs.
Lenin introduced the New Economic Policy, which partially restored the former market conditions and monetary exchange. It also focused on self-interest in order to motivate people (but it opposed the socialist idea).
Formation of the USSR
The Union of Soviet Socialist Republics (USSR) was established in 1922, as a consequence of the Bolshevik coup.
Death of Lenin
Lenin, the first leader of the USSR died in 1924, which meant an opportunity for Stalin to gain power.
Constitution of the USSR
The constitution of the USSR was introduced in 1924, which theoretically provided a federal system of independent republics with legislative (All-Soviet Congress) and executive body (Executive Committee).
The First Five-Year Plan
Stalin completely changed the system of economy and planned economic policy replaced the former NEP (New Economic Policy, introduced by Lenin). It served the aim to speed up the building of the socialist system. However, this idea was unpopular due to the necessity of social transformation.
The heavy industry was prioritized, which led to underdeveloped agriculture, due to the planned economy. As a result, the famine that can be originated back to this killed 7-10 million people.