Some reactions seem to break the law of conservation of mass, but the apparent change in mass can usually be explained because a reactant or product is a gas whose mass was not measured. No atoms are lost or made.
When a metal reacts with oxygen, the solid product is greater in mass than the metal. For example, in 2Mg + O2 → 2MgO, the magnesium oxide includes the mass of the oxygen from the air that joined the magnesium. The oxygen is a gas reactant, so its mass was not on the balance at the start.
In the thermal decomposition of a metal carbonate, such as copper carbonate or calcium carbonate, carbon dioxide gas is made and escapes into the air from an open (non-enclosed) container. The metal oxide is the only solid product left, so the mass seems to decrease. For CaCO3 → CaO + CO2, if 10.0 g of calcium carbonate decomposes to leave 5.6 g of calcium oxide, the 4.4 g that went missing is the carbon dioxide.
In terms of the particle model, gas particles are far apart and move freely, so those from the reaction spread out into the air. In a sealed container the gas cannot escape and the total mass stays the same. In an open container the mass can appear to decrease.