srand() is used together with rand() to generate pseudo-random numbers. srand() is to seed the random number generator (RNG). Using the same seed will give the same sequence of random numbers from rand() so in most cases you want to use a different seed each time. The time() function is often used as seed because it returns different values each second. srand(time(0));
Only call srand once in your program before the first call to rand(). At the beginning of main is a good place. It is a common mistake to call srand each time rand() is called but that will just give numbers that are less "random".
rand() returns an int between 0 and RAND_MAX, where RAND_MAX is a big constant that depends on the compiler. To limit the range of the random number % operator is often used. If you have not seen it before, search modulo operator or remainder operator to understand how it works. rand() % 91 will return values between 0 and 90. by adding 10, rand() % 91 + 10 you get a number in between 10-100.