The common sum must be $15$, because the sum of numbers from $1$ to $9$ is $45$. How can we write $15$ as sum of three distinct numbers between $1$ and $9$ (included)?
We have just eight ways and we can try accommodating them in the square. The central place belongs to one row, one column and the two diagonals, so the number we put in it must appear four times in the above sums: the only one is $5$.
Similarly, in the four corners we have to place numbers that appear three times, that is: $2$, $4$, $6$ and $8$.
This also shows that basically only one $3\times3$ magic square is possible, up to symmetries of the square.
How to compose the magic square? First note how many rows, columns and diagonals each cell belongs to:
Now we know that $5$ must be in the center; choose arbitrarily an even number, say $2$ and place it in a corner. It could go in any corner, let's choose the upper left one; in the opposite corner we have to write $8$:
Now $4$ must go in one of the other corners and $6$ in the opposite one:
At this point, the other cells can be filled in a unique way:
We have four choices for placing $2$ and, for any choice we can choose two places for $4$. In total we have eight magic squares, but just one if we consider two of them identical after applying a symmetry of the square (there are eight of them).
If we subtract $5$ to each cell, we can better see the symmetry: