I assume each magic square must be composed of numbers $1,2,\dots,9$ (or $1,2,\dots n^2$ in general).
Covering $3\times 3\times 3$ cube with magic squares is not possible. Notice that the center number of a magic square is $5$, and once a number at a corner of a magic square is fixed to be $a\ne 5$, the number at the opposite corner (ie. on the same diagonal as $a$) is $10-a\ne a$. However, in the cube with corners having coordinates $\pm 1$ (say), there is a triangle with vertices $(-1,-1,-1)$, $(-1,1,1)$, $(1,-1,1)$, whose sides are formed by surface (magic) diagonals, which is impossible.