We start off by drawing attention to the first number in the question, 12. The number can be broken down into multiples by dividing it by the lowest number (that isn't 1): This breakdown is as follows:
12=2*6
The 6 can be broken down also giving:
12=223
Now this number is finished with since 3 is a prime number.
Now do the same for the second number:
18=233
From the 2 breakdowns take out the matching multiples. This comprises of 2*3, because you can see there is a 2 and a 3 in each breakdown.
Now, this gives 2*3=6, which is the HCF as required.