First we should know about latches so that we can understand flip-flop.
Now we will learn some latches and how to make their truth table.
SR latch using NAND gate ↓
SR flip-flop ↓
SR latch using NOR gate
SR flip-flop
It is a situation when all these 3 condition occurs simultaneusly.
Shift registers can be found in many applications. Here is a list of a few.