Heat a test tube of green copper(II) carbonate and it turns black while a gas bubbles out that turns limewater cloudy: CuCO3→CuO+CO2. One compound went in; two came out. That is a decomposition, AB→A+B, the reverse of synthesis. The test is to count the reactants: exactly one substance, breaking into two or more simpler ones.
Most decompositions need energy, because they break bonds that released energy when the compound formed. Heat splits carbonates into a metal oxide and CO2, and potassium chlorate into potassium chloride and oxygen, 2KClO3→2KCl+3O2. Electricity splits water, 2H2O→2H2+O2. Light breaks silver bromide into silver and bromine, which is how old photographic film worked. A few compounds fall apart easily: hydrogen peroxide slowly turns into water and oxygen even in its bottle, which is why it is sold in dark containers.
A free element among the products does not make a reaction a decomposition. In Zn+CuSO4→ZnSO4+Cu, copper comes out as an element, but there were two reactants, so zinc has displaced copper. Count the reactants first: one means decomposition; a free element plus a compound means single displacement.
Think of it like this. Decomposition is like taking apart a finished model: one object goes in and a pile of smaller pieces comes out, and pulling it apart takes effort. That matches the energy most compounds need, as heat, light or electricity. Unlike model pieces, the products can be completely different substances, such as two gases from one liquid.
Core idea. A decomposition reaction has exactly one reactant that breaks into two or more simpler products, AB→A+B, usually with heat, light or electricity supplying the energy to break its bonds.