The answer is a spontaneous chemical reaction .
A spontaneous chemical reaction is a reaction that occurs, without the need of any external energy like heat etc.
Eg : ionic reactions
Na+ + 1e- --> Na
It is a spontaneous reaction. You give electron to Na+, and it just absorbs electrons readily, without need to add heat or light or any other energy source
A cell has this exact type of reaction at anode (negative) and cathode ( positive) .
At anode, a reaction starts, where electron is produced. But, this reaction cannot be continued because there is no agent to take away produced electrons .
At cathode, another reaction occurs, which needs electrons. This reaction too will not occur as electrons are not available.
But when cell is connected to circuit, electron from anode travels to cathode, thus completing reaction. When electron moves, its energy is obtained as electricity in circuit.
Now, the reactions at anode and cathode are complex, but they are not complete without one another. That means, anode and cathode needs one another to complete reaction. So, such reactions are called half cell reactions.
You will learn more in 11 and 12 th classes in electrochemistry.
Now, just know that 2 seperate half reaction causes electron movement and thus cell works.