Do you know how roulette wheel looks like? It is a circle that has numbers. The numbers are not in simple sequential (1, 2, 3, ...) order, but somehow suffled.
Imagine that rand() has a big wheel and it remembers current position. Every time you call rand(), you get the value from the position and the position increments by one.
If you start reading from same position, you will always get the same serie of "random" numbers.
What does the srand() do? It changes the current position.
Which starting position do you pick?
time(0)
, current time.
What is the resolution of the clock? How much time has to pass, before time(0) returns a different (next) value?
How many instructions -- how many iterations of the loop -- can the CPU process before we see change in time? Before the srand() sets different starting position for rand()?
If time(0) is in seconds, then a whole second has to pass before time changes. CPU's have clock in GHz range. GHz means 1'000'000'000 cycles per one second.
That said, the use (and learning) of rand() and srand() is no longer recommended. The produce very "low quality" randomness. C++ has in its library the <random> that has better alternatives.
For example, see
http://www.cplusplus.com/reference/random/uniform_int_distribution/