To solve the 3 by 3 grid, you start with the first number (in this case 1) and write it in the centre box on the bottom row. You then move diagonally to the right, imagining a copy of the grid to be positioned beneath the actual grid. So number 2 would end up in the top rightmost box.
Diagonally from this (using your imagination to make a copy of the grid to the right of the actual one) you write 3 in the first box of the middle row. But this time you can't move diagonally so you write 4 in the empty box above 3. Continue diagonally with 5 and 6.
You're blocked from going diagonally from 6 (because 4 occupies the box), so you write 7 immediately above 6. Diagonal brings you to 8 in the first box of the bottom row and 9 goes in the remaining box which is diagonal to 8.
You can do this to produce a magic square starting with any number. The constant sum of 15 (in this case) is determined by the sum of natural numbers from 1 to 9 divided by 3=45/3=15, because there are 3 rows and 3 columns.
Build your own magic square using the above method. It's fun! And amaze your friends!
There are other ways to create magic squares. You can rotate the square with its numbers or reflect it to produce other magic squares using the same numbers. For example
2 7 6
9 5 1
4 3 8