First, we need to mention that the mass flow rate chokes at M = 1.
Why does the flow chokes at M = 1?
Imagine you have a constant air source (pressure & temperature) and a tube connected to it with a closed valve. The tube is closed at the other end. When you open the valve, a pressure wave will be sent through the tube, traveling at the speed of sound. You can look at that pressure wave as the way molecules communicate with each other. That pressure wave says: «We want to go in, get ready». When the pressure wave will reach the tube end, the local molecules will send back the pressure wave, a way to say: «There is no space here, don't come in.» When the pressure wave will be back at the tube entrance, it will tend to slow down the fluid entry and the higher the pressure inside the tube it will be, the slower will be the fluid flow until it stabilizes (to zero).
Now imagine the same set up, but with tube exiting to the atmosphere. Now when the pressure wave reach the exit, the local molecules have a different message to send back: «We have lots of free space, keep them coming!» So instead of high pressure wave, they send back a low pressure wave (think vacuum). When this low pressure wave arrives at the tube entrance, it favors a faster flow. It does so until the flow stabilizes.
When you have a convergent or divergent nozzle, instead of reflecting an intense pressure wave at the end, it reflects a series of weaker pressure waves, i.e. every time the cross-sectional area changes.
What happens when the velocity of the fluid reaches M = 1? Well, the pressure front of the flow actually follows the pressure wave it sent. So they both arrive at the tube exit at the same time. So, in the case where the exit end is opened, the local molecules send a low pressure wave back to say: «We have lots of free space, keep them coming!» but the full pressure is already at the exit, so whatever the flow you have, it won't increase more.
If you try to decrease the area, as the speed attempt to increase, a high pressure wave will be returned to set the Mach number to 1. This doesn't necessarily mean that the fluid velocity is not increase, it can also mean that its temperature is increase as M = V/√(kRT).
Why does the flow becomes supersonic in a divergent nozzle when M = 1 at the entrance?
When there is an increase in area, the mass flow rate (ρVA) must stay constant. Normally the velocity decreases to compensate. But if you do this when the flow at the entrance is at sonic speed, it will mean that the pressure wave will begin to go faster than the pressure front and a low pressure wave will be reflected to aid increasing the flow. But the flow cannot increase since it is choked. So V can't go down. If it doesn't, then the density must go down. Density is equal to PR/T, so either decrease the pressure or increase the temperature. If you increase the temperature, you also increase the speed of sound [√(kRT)], which in turn reduces the Mach number if you keep the velocity constant; you have the same problem as before, so this solution is out also. All nature can do is lower the pressure. But when you lower the pressure, you also lower the temperature (isentropic process). If you lower the temperature, the speed of sound decreases, so the Mach number increases (even if the speed doesn't change). Another effect of having a decrease in pressure and temperature is that all that internal energy has to go somewhere and will be transformed into kinetic energy, i.e. the velocity will also increase (Bernoulli principle).
When you do all the calculations, you find out that overall, the Mach number will increase in a divergent nozzle when M = 1 at the entrance. So now the pressure front goes faster than the pressure wave it sends. These pressure waves will start to accumulate one over the other until it creates a shock. This shock is a local increase of pressure. If the pressure increases, the density increases, as well as the temperature, thus the speed of sound increases as well. So the system can take it anymore and reverts back to subsonic flow. The area change needed to create that shock depends on the energy contained in the flow at the entrance.
More info:
Shock wave
Isentropic nozzle flow
de Laval nozzle