The plants contain the enzyme myrosinase, which, in the presence of water, cleaves off the glucose group from a glucosinolate. The remaining molecule then quickly converts to an isothiocyanate, a nitrile, or a thiocyanate; these are the active substances that serve as defense for the plant. Glucosinolates are also called mustard oil glycosides. The standard product of the reaction is the isothiocyanate (mustard oil); the other two products mainly occur in the presence of specialised plant proteins that alter the outcome of the reaction.
In the chemical reaction illustrated above, the red curved arrows in the left side of figure are simplified compared to reality, as the role of the enzyme  myrosinase is not shown. However, the mechanism shown is fundamentally in accordance with the enzyme-catalyzed reaction.
In contrast, the reaction illustrated by red curved arrows at the right side of the figure, depicting the rearrangement of atoms resulting in the isothiocyanate, is expected to be non-enzymatic. This type of rearrangement can be named a Lossen rearrangement, or a Lossen-like rearrangement, since this name was first used for the analogous reaction leading to an organic isocyanate (R-N=C=O).
To prevent damage to the plant itself, the myrosinase and glucosinolates are stored in separate compartments of the cell or in different cells in the tissue, and come together only or mainly under conditions of physical injury (see Myrosinase).