In June 12th 1990, the Russian Federation declared its independence from the Soviet Union, effectively ending the Soviet Union. While I understand that other parts of the former Soviet Union like Ukraine and the Baltics People could declare their independence, I do not understand how it could happen that Russia, which was by definition the Soviet Union declared its Independence from... itself?
To summarize @semaphore's comments which should be the accepted answer:
Technically, Russia was not the USSR (just like England is not Britain or UK.)
Of course, de-facto, USSR was just a re-branding of the old Russian Empire, just like the modern Russian Federation is the heir to the Soviet Union.
However, the Soviet state structure was a weird combination of Lenin's rhetoric of "ethnic areas having the right to self-determination. up to and including independence" and Stalin's practice of a centralized dictatorship. The reality was the "Union of Soviet Socialist Republics" was composed of 15 "Republics", one of them called "Russian Soviet Federate Socialist Republic" and 14 other SSRs (Ukrainian SSR &c).
When in the 1980-ies a combination of the need to compete with the SDI and low oil prices brought about an economic hardship, Gorbachev started "perestroyka" (a political liberalization plus half-hearted economic reforms) which lead some of the republics to hope for independence. The 3 Baltic states started the so called Парад суверенитетов and Russia was the 6th to declare its sovereignty on 1990-06-12. Note that at that moment this declaration was a largely symbolic gesture (none of the Republics controlled the military and KGB stationed there) and, in a way, diluted the push of the Republics for independence ("if everyone is special, nobody is").
That date is now celebrated in Russia as the Independence Day.
Russia is Russia
USSR was dissolved by Russia, Ukraine, and Belorus on 1991-12-26 (1.5 years after the Sovereignty declaration). This was an admission of the existing situation after the 1991 Soviet coup d'état attempt: the only structures of the USSR that still existed were the military and security forces, and they were being brought under the local administration of the newly independent Republics post haste. What was needed was a coup de grace which would force Gorbachev to surrender the control over the nukes to Yeltsin.
Russia was the largest republic but of course it was not the same as Soviet Union. (Though many people in the west confused Soviet Union and Russia).
The decision to terminate the Union was made by three presidents. Each of them had his own interest: Ukrainians and Belorussians wanted independence. Russian president (Yeltsin) wanted independence from Gorbachev who was the president of the Union. The result of this act for Yeltsin was that he became the leader of the country by a clever move of eliminating Gorbachev's position, so from his point of view this could look like a coup d'etat.
However this would happen in any case, because shortly before Ukrainian parliament decided on independence, and this was soon confirmed by the referendum. Similar decision was made by Belarus. So there was no way to preserve the union, no matter what Yeltsin and the Russians wanted.