Also, I believe that the second stage continues to burn for quite some time even after seperation of stage 3.
When you shut down a rocket stage, its acceleration drops to zero and the rocket becomes weightless. As a result, the propellants may start sloshing around their tanks. This could lead to gas entering the pipes leading to the engines (since the propellant will have 'sloshed' away from the pipe entrance). If a gas pocket were to hit the engine's turbopump, even a small one would probably lead to destruction of the turbopump, and ultimately the destruction of the rocket.
There are several ways to avoid this. Many rockets use small ullage motors to provide some acceleration and settle the propellants. So you fire the ullage motors, and then you can start the main engines.
The Russians went for a less complex design: by starting the third stage while the second stage is still attached, they can avoid ullage motors and the precise timing they require. The stage separation mechanism also becomes less complex (as Horsh pointed out).
The disadvantage is they'll have to cover the top of the second stage in insulation, to prevent the hot gases from burning a hole in the second stage. So, less complexity but more weight, and probably more drag due to the open lattice of the interstage. This method was also used on the N-1.
Разделение второй и третьей ступеней происходит по «горячей схеме».
Третья ступень (блок «И»), состоящая из переходного отсека, бака горючего, бака окислителя, хвостового отсека и двигателя, установлена на центральном блоке и соединена с ним с помощью ферменной конструкции.
Блок «И» снабжен двигательной установкой, состоящей из четырехкамерного двигателя однократного включения и четырех поворотных рулевых сопел, используемых для управления полетом по трем осям. Маршевый двигатель третьей ступени включается примерно за две секунды до отключения центрального блока.
Газы, истекающие из сопел двигателя третьей ступени, непосредственно отделяют ступень от центрального блока.
I have slightly edited the google translation, to make it a little more intelligible:
The second and third stage separation is done "the hot way".
The third stage (block "I"), consisting of the transfer compartment, fuel tank, oxidizer tank, tail section and the engine is mounted on the central unit and connected to it by a truss.
Block "I" is equipped with a propulsion system consisting of a four-chambers single start engine, and four rotary steering nozzles used for flight control in three axes. The main engine of the third stage is started about two seconds before the center unit shuts off.
The gases flowing out of the third stage engine nozzles directly separate the stage from the central unit.
The last sentence seems to be the answer to your question.
The third stage is fired while the second has not yet been detached so the craft is experiencing constant acceleration during flight. This is so the fuel is pressed toward the back of the tanks at all times to avoid complicated pumps, ullage motors, etc. Also, the reason you should be concerned about not blowing up the second stage is that while the 2nd stage hasn't yet detached, its engine hasn't shut down either. Remember the continuous acceleration needed for the fuel? That's why. The 3rd stage also continues firing after it has been detached from the 2nd because that stage actually gets the Soyuz craft into orbit. I hope this didn't feel like a repeat of what everyone else was saying, just thought it could use clarification.