J-K and D flip-flops are two common types of flip-flops. A J-K flip-flop can maintain a binary state until an input signal switches it, and both J and K inputs can toggle the state. A D flip-flop samples the D input during a clock pulse to set or clear the output. Both flip-flops use NAND gates in a feedback configuration to store state, but the D flip-flop directly connects the D input to the set input and inverts it for the clear input.