Hi ... I suggest you wiki the Legendre symbol to get a better idea of it ... also wiki the proof for the Second Supplement to the Law of Quadratic Reciprocity.
The idea is this, we know that even numbers are of the form 2n, and odd numbers 2n+1. We can extend this further by showing that 4n and 4n+2 are even numbers, while 4n+1 and 4n+3 are odd numbers (and the combination of 4n, 4n+1, 4n+2, 4n+3 represent the form of any number) ... this is all actually from the division algorithm which states that for any two integers a and b, both greater than 0, there exists another two integers q and r such that a=bq+r where r is less than b and greater than or equal to zero.
So, we can set our a to be a prime number, say p, and we let our b=8. This gives us the following possibilities:
p=8q
p=8q+1
p=8q+2
p=8q+3
p=8q+4
p=8q+5
p=8q+6
p=8q+7
If you look at those equations, you'll notice that 8q, 8q+2, 8q+4, and 8q+6 will give you even numbers, so they can't be odd primes. So you're left with 8q+1, 8q+3, 8q+5, and 8q+7
as the forms of odd numbers (and thus possibly odd primes).
Now, let's take a look at p^2-1 = (p+1)(p-1) where p is one of the possibilities mentioned above.
For:
p=8q+1, (p+1)(p-1) = (8q+2)(8q) = 8q(8q+2), since 8|8, 8|8q(8q+2), then 8|p
p=8q+3, (8q+4)(8q+2) = 8q(8q+2) + 4(8q+2) = 8q(8q+2) + 32q + 8, and if you look at that, all those terms are divisible by 8, so 8|p
You can do the same for the rest ... and you'll see that if a prime is of any of those forms, then it will be divisible by 8.
You might be able to use this method to show 24|(p^3-p), but it will be somewhat tedious ...