How do you add up numbers between 1 to 8 to get the sum of nine across, diagonally and horizontally in a box of nine squares?

no way. If you have to use all the numbers from 1 to 8, then the sum is 36.

Since a row or diagonal or row contains 3 boxes, some such must add up to more than 9.

If you are looking for construction of a 3x3 magic square, use the numbers from 1 to 9, and the sum of each row is 15.

a simple web search will reveal a simple method for constructing any odd-order magic square.