Household bleach is sodium hypochlorite Na(+1) OCl(-1). There are other common ones such as hydrogen peroxide (H2O2). They are oxidizing agents, that is they remove electrons from the substance that causes the stain. In many cases, but not all, the oxidized form of the stain is colorless, or at least less highly colored than the reduced form, so the stain disappears. There are many mechanisms by which a substance is colored. All that is required is that the substance absorb some wavelength of visible light (wavelength between about 400-700 nm). How effective one bleaching agent (oxidizing agent) is over another is difficult to predict. One example is a blood stain. Household bleach will bleach a blood stain, but not so effectively, while hydrogen peroxide bleaches the blood stain instantaneously. So the general mechanism of a bleach is a chemical reaction in which the reactants are colored but the products are not.