Choose a prime number, "p," such as 5. A prime number has no divisors other than itself and 1. For example, 4 is not a prime number because "4/2 = 2"; so it has 2 as a divisor.
Calculate "2^n mod p" for each integer "n" from 1-(p-1). Using the example, "p" is 5, so you calculate "2^n mod 5" for 1-4. This produces the list:
2^1 = 2 mod 5 = 2
2^2 = 4 mod 5 = 4
2^3 = 8 mod 5 = 3
2^4 = 16 mod 5 = 1
Check if the list of numbers contains all the possible remainders mod 5. The list 2, 4, 3 and 1 qualifies, so 2 is a primitive root modulo 5. If the list had instead been 2, 1, 4 and 1, which it is for 4, then it would not be a primitive root because it is missing the number 3.
Repeat the previous step for all integers less than 5. The number 3 is also a primitive root modulo 5, but 4 is not; so 2 and 3 are the primitive roots for 5.