You would first want to draw out a tree diagram (example given by whiteboard) and divide the number given e.g. 8 in the question by prime numbers e.g. 8 can be split into two branches 2 and 4. 2 is a prime number so that that branch stops. However, 4 can be split into two further branches 2 and 2. You would then note down that 8 can be made by multiplying those prime numbers together 2x2x2
You would do the same for 24. In this case you would end up with 2 x 2 x 2 x 3.
You would then see what is common between the sets of multiplying primes. You can see that in both sets, the number 2 is repeated 3 times so to find the highest common factor just multiply 2x2x2 and the answer is 8