Sounds like you're talking about a simple RS flip flop. A memory circuit built around two transistors and a few resistors.
Two inputs R (for reset) and S (for set). Outputs are called Q and NOT Q.
Grounding an input lead turns off a transistor and turns on the other transistor. It holds this state indefinitely. You can return the input lead to positive and the circuit won't change state. Thus it has a memory.
When you ground the other lead, the circuit switches to the opposite state. And holds it indefinitely.
You pick up the HI-LO output at the transistor collectors.
RS flipflops are available in common IC chips, or you can build it with transistors.