There are many ways a "prop" gun can hurt people. While airsoft or other non firing replicas are often used on a movie set it is not uncommon for close-ups or for period pieces (like a western) to use real guns that are loaded with "blanks." Blanks are real ammunition that have a primer and gunpowder as well as a shell but do not have a bullet. Blanks are what are used in starter's pistols which used to be the norm at every track meet from high school to the olympics until advances in electric starting and timing equipment.
Assuming it was a real gun that was loaded with blanks there are several potential ways an accident could happen. One is a misfire where the explosion of the blank actually damages the gun and sends shrapnel flying. This can happen with guns loaded with real bullets too where the force of the exploding gun powder can break the actual gun. If it's an older gun the steel can have integrity issues and while it might look okay from the outside it might actually be strained to the point that even firing a blank can cause it to fly apart. This can be exacerbated if the gun wasn't loaded properly or the blank wasn't made correctly or had a defect
There could have been some time of foreign object in the gun, anything in the barrel or even chamber could be forced out at high velocity form the force of the blank explosion.
In the case of Brandon Lee someone had loaded the prop gun with a real bullet which is what led to his death. As a result of his death there were new protocols put in place on movie sets so the likelihood of this happening should be rare but it is a possibility.
Blanks can kill in other ways such if you put it against someone's temple the force of the escaping gas could fracture a human skull but that would be unlikely b/c the safety issues are well known and also it wouldn't explain how two people were injured.
Not knowing the details my guess is it was a real gun that was loaded with a blank that some how malfunctioned. Older guns sometimes would need custom fabricated ammunition and so there's any number of ways the integrity of the blank or gun could come into play. I assume we'll learn more in the coming days.
I'm also assuming that if Baldwin were acting in a reckless way i.e. pointing the gun and pulling the trigger at people outside of the shooting of a scene or rehearsal that we'd be hearing rumors from various staff that was on set.
It seems like a tragedy all around and perhaps will lead to better safety protocols on movie sets.