Transistors use a small current to control a larger current. You can think of this as one person tapping another on the shoulder of another person. But what good is that? Not much, on its own.
It is only possible to use this property to store data because you can build a circuit called a flip flop https://en.wikipedia.org/wiki/Flip-flop_(electronics) that enables 2 pulses of current to translate into 1 pulse of current.
That may not seem like much, but it enables everything happening in modern digital technology.
So how does it work?
Let's say you have 5 people in front of you, in a line. Everyone in line is directed to tap once on the next person for every 2 taps on their shoulder. So, for you, you feel 2 taps, and then you tap once. This is what a flip flop does.
Now, you get an additional instruction. When you are tapping with your left hand, you raise your right hand and when you are not tapping with your left hand, you lower your right hand.
Now, for every tap of the first person, the next person taps half as often, and the next person in line taps half as often, etc.
If everyone keeps time, looking at the group of people, you will see raised arms and lowered arms. The raised arms are 1s and the people without raised arms are 0s. Now you are counting in binary.
In a digital clock, this process is used to translate a quartz crystal's pulses into counting seconds and time. The same process can also be used to store numbers. For example, let's say I have 25 flip flops in series. Now, I can store a number as large as 2^25 in memory.