The redstone signal comes from the gate adjacent to the engine. Gates basically do "IF condition = true THEN take an action". And emitting a redstone signal is part of the possible actions they can do. You should really look at gates first, then you will understand what I meant. It's very intuitive.