I'm curious as to how much a Soviet Republic resembled an American State or German Bundesland in terms of autonomy, different laws, etc. But I also wonder why they even existed to begin with; what prompted the Bolsheviks to adopt this federation system, rather than centralizing government and uniting everyone into a single Soviet republic? What was the purpose of separating all these polities from Russia itself?
Well, the creation of Soviet Republics and the USSR was a post-Civil war settlement mostly designed by Lenin and Stalin, the latter as People's Commissar of Nationalities (being himself a Georgian). At first, only the RSFSR (Federal Russia) existed, whose first autonomous republics were Tatarstan, Bashkiristan and Turkestan, but which were cunningly designed to have a substantial Russian majority inside their own borders.
During the Revolution and following Civil war Finland, Estonia, Latvia, Lithuania and Poland achieved independence after fighting with German and Red Army alike. In the caucasus, Georgia, Armenia and Azerbaijan had declared independence from Russia during the Civil War but were conquered by the Red Army with the help of local Bolshevik groups. Ukraine and Belarus were the first truly Soviet Republics outside the RSFSR. Soviet Belarus was created by a split of Bolshevik Belarussians after its reconquest from the German Army. Soviet Ukraine was also created by a local split of the party, with the extra complication that there was Civil War in Ukraine between Reds, Russian Whites, Greens (peasant anarchists) and Ukrainian Nationalists. After the Whites were defeated in Crimea, the Greens brutally repressed and the Nationalists defeated after the Polish-Soviet war, the Ukrainian Socialist Soviet Republic claimed power over most of modern-day Ukraine.
The Bolshevik Party leadership, the members of the Politburo (i.e. Lenin, Trotsky, Stalin, Kamenev, Zinoviev, Bukharin, etc.) found themselves with Autonomous republics inside a RSFSR whose government they controlled, newly conquered former independent Republics in the caucasus, and two independent Soviet Republics in Belarus and Ukraine. Even though Lenin was an anti-imperialist who called for the "freedom of oppressed peoples" and the "right to self-determination", there weren't many who thought like him. Red Army officers, many coming from the Russian Imperial Army, were delighted in having reconquered most of former Imperial lands in Eurasia. Bureaucrats inside the People's Commissariats, most also "inherited" from former Imperial administration, were also taking pride in Russian nationalism. This feeling permeated inside the Bolshevik Party too. After all, it was Bolshevik members of the Tashkent Soviet who massacred Turkestani political and religious leaders; and went on to create a Turkestani Autonomous Republic where most of the members of its Central Soviet were ethnic Russians, with an almost non-existant representation of local nationalities; even though the share of Russians in the territory was a minority (we are talking about under 10%, although I don't have the exact figures right now).
With this said, Stalin's proposal was that all ethnic republics should be integrated in the RSFSR as Autonomous Republics subordinated to the Russian Sovnarkom (Council of People's Comissars, the Soviet Cabinet). Lenin counter-argued that this would just be Russian imperialism, and proposed the creation of a superior federal state, a Union of Soviet Socialist Republics, USSR, where all nationalities could be included. His proposal foresaw the integration of all future Soviet Republics into this Union, even if they were never a part of Russia, such as a German Soviet Republic, a Romanian Soviet Republic or a Hungarian Soviet Republic (which were trying to be created during the period of this debates in the early 1920s). There was a cynical angle to this, the politics of empire, in which by favouring an ethnic group in particular, that group would be a Politburo ally against any other local minorities, such that Ukrainians would be favoured against Greeks, Jews, Romanians and Poles living in the Ukrainian SSR, gaining an ally in Ukrainian nationalism. Lenin would indulge Stalin in his hate of his former colleagues in Georgian nationalism by creating a Transcaucasian SFSR which would include the three caucasian states instead of separate Republics for each nationality. Thus the USSR was created in 1922, with an already sick Lenin chairing the Sovnarkom and the Politburo. The system would mutate during the following years, creating and disbanding Soviet and Autonomous Republics, until reaching its final shape in 19511956.
Each Soviet Republic would have their own Sovnarkom and be pretty autonomous in implementation of policy, but not in decision of policy. That was the catch. Because while the USSR was a federal state, the Bolshevik (later Communist) Party was not. The CPSU was highly centralized, and while Ukrainian Sovnarkom was not subordinated to Russian Sovnarkom, its members were subordinated to the decisions of the Politburo (later Presidium) as members of the CPSU. They were also liable to be investigated by the centralized Cheka (OGPU, NKVD, KGB), which was under the control of the Politburo and the Party Secretariat. So, while the Republics were highly autonomous in theory, they were not in practice, as everybody was subjected to the control of the Party.