I saw this in many online games, but I do not understand how it works. With every move we can gain time, but what is it dependent on how much we get? Can please somebody explain the system behind it.
Take a look at Wikipedia's time control article:
Fischer delay (or time increment), invented by Bobby Fischer. When it becomes a player's turn to move, the delay (or increment) is added to the player's remaining time. For example, if the delay is five seconds and the player has ten minutes remaining on his clock when his clock is activated, he now has ten minutes and five seconds remaining.
And in the usage of chess servers:
On chess servers (like Internet Chess Club and Free Internet Chess Server) the time control is usually expressed with a formula: time+increment. Where time is a fixed amount of time (in minutes) assigned at move 0 for the entire game, and increment (in seconds) is the amount added after each move.
When the increment is 0 the time control turns into a sudden death: so a 5+0 game is a game with sudden death at 5 minutes.
When the increment is bigger than 0 the time control is a Fischer delay: e.g. a 2+12 is a game with Fischer delay with 2 minutes + 12 seconds each move.
A game can even have a time set to 0: the clock is set to 0 and started after the first move with the increment only on both sides, and each move each player is granted only the increment: a 0+10 is a game where after the first move each player has 10 seconds to move.
To sum it up:
Time increment gets added to your current time to compensate for a probable delay (for humans is the reaction time and for servers may compensate for latency etc.). If you are fast enough to play your move before the increment ends, the extra time gets added to your current time thus augmenting your remaining time.
I second John Moutafis' answer. The increment here is always the time which is basically for a few secs like 3, 5, 10, 15, 30 or may be even longer in some cases.
Now, why this increment and how this works. When two players play a game with a time limit on the clock, the time decreases.
For example, playing in Chess.com with a time of 5 mins each for both players. So total time is 10 mins. Within this stipulated time, each player can think of the moves. Now, because of this limited time, both players have to be careful not to lose the game on time and make sure they play the best moves from their own side. Now, as we all know, chess requires thinking, so either player can run out of their clock if they tries thinking too much deep. Even you will see that 1000s of games are being lost by top players because of time deficiency.
Hence, if you have an increment on your clock, you would see that during endgames, the players take a refuge and they are able to play better and never become nervous due to the time factor. Understanding how the increments happen is on every move each player gains a respective number of secs.
Let's assume that the game lasted for 40 moves each for either player and then one resigns. So 40x3 (increment time value in secs) = 120 secs or 2 mins extra both players get on their clock which makes the game a bit longer and the players were able to perform better. At least I would suggest playing with some time increments in any chess website and you would feel the difference yourself.
Nobody mentioned that you have to be quick enough. So if the increment (or delay or bonus) is 5s, the effect is when your turn comes and you move within the increment value of 5s, you gain 5s. If you make a move after that 5s has passed, nothing gets added. Example, your, say at 17th turn, you have 4:07 left on your clock. You starts to think and after 2s, when your clock is left with 4:07-:02=4:05 you move. Your clock increases to 4:10 from 4:05. On the other hand, if you make the move after 6s, when the clock is at 4:01, it remains at 4:01.
Why the term 'delay'? Not sure. The effect is not same if the clock starts with a delay of 5s. So if you move within that, the clock remains same and if not it starts counting down.