Like all living things, bacteria must eat to survive. Fortunately certain types of bacteria will use for food the grease, hair, soap film and all the organic waste that tend to clog peoples drains. Enzymes act like short order cooks. Each enzyme works on one specific type of molecule. For example, the protease enzyme only works on protein.
Lipase works only on fats.
The bacteria are dormant while in the jar. When mixed with water they come to life in about 30 minutes. In the meantime the enzymes are breaking down the waste. They are very fast. In fact, they work on contact.