Actually that's a bit of a misconception. Most guns in films are live real firearms. They have blank firing adaptors in them. The ones that have a plugged barrel (or "suicide gun"), don't emit the muzzle flash out the front and it comes out the action, which isn't very realistic. Plus there is only a few models of strictly made blank guns. Believe it or not but most guns are live.
That's why the armourer has a huge job on set, and security is paramount. Becuase when you have 10 guns all live and all machine guns or fully auto, that's dangerous. And that's also why no one ever points a gun at anyone on set, even while filming. And mostly why guns are rarely fired close to someone else ("pointing towards them"). When they are usually some sort of protection between actors is needed (IE plexi etc).