If the electrons and protons are moving in a circuit, then they should cancel each other after crossing the barrier? How is it working?
Only electron move in a circuit,not the protons. This is because protons are binded within the nucleus but the electrons are free to move around due to potential differences.
However, if the protons could move they would be moving in a direction opposite to electrons if same voltage was applied to both of them.
First you have to think that the valence electrons of the metal are moving freely.
If a potential is applied to the circuit, say, a battery, you can imagine that these electrons are going to move in order to minimize their energy (you can think of them suffering a force $-\nabla V$ aswell). This results in the negative charges(electrons) going to the positive end of the potential.
By definition, charges in movement is current.