Sequential circuits use memory so their output can vary based on previous inputs and states. A flip-flop is a basic type of sequential circuit that samples inputs and changes outputs only at certain times. The simplest flip-flop is made from two cross-coupled NAND gates forming a Set-Reset latch. A JK flip-flop is like an RS flip-flop but with separate inputs for setting and resetting. A Master-Slave JK flip-flop prevents unwanted toggling using two flip-flops triggered on opposite clock edges. Other types of flip-flops include D flip-flops which delay inputs to outputs and T flip-flops which toggle outputs on each clock pulse.