Speed up Magic square program
You should use try-with-resources when you create a Scanner, and should only ever open a Scanner on System.in in your main program.  If you do this, you can pass the required size as an argument to the MagicSquare constructor:

public static void main(String[] args) {
    try(Scanner sc = new Scanner(System.in)) {
        byte size = sc.nextByte();
        MagicSquare m = new MagicSquare(size);
        m.printSquare();
    }
}


I’ve left construction of the magic square in the constructor (seems appropriate), but moved printing of the square to the main program.  After all, you might not always want to print the magic square.



You have numerous inefficiencies in your implementation:

You use square.length and (worse!) square[0].length when you could simply use size if you stored the magic square’s size as a size member.

You are testing x &lt; square.length &amp;&amp; y &lt; square.length before resetting square[x][y] = 0;.  The x and y values should always be valid if you reach this step of the solve() method.  But there is one small possibility of them becoming invalid.  After filling in the last square...:

if (x == square.length &amp;&amp; y == square.length-1 &amp;&amp; isMagic()) {
    return true;
}


If it turns out isMagic() returns false, the method continues, loops over all values looking for an unused one (there aren’t any), and exits the method, returning false, but only after resetting square[x][y] = 0; which is why the check for invalid coordinates is required.  If instead you used:

if (x == square.length &amp;&amp; y == square.length-1) {
    return isMagic();
}


... then the method always returns immediately, whether or not the completely filled in square is magic or not.  Now, the if guarding square[x][y] = 0; becomes unnecessary.



But the real issue comes from your algorithm as a whole.  You loop over \$N^2\$ squares, and for each square try each of the \$N^2\$ values, and for each value check each of the \$N^2\$ squares to see if the value is already used.  This is an \$O(N^6)\$ algorithm!

The usage check can be reduced to \$O(1)\$ by storing a “used” flag for each number:

boolean used[] = new boolean[size*size+1];


or

BitSet used = new BitSet(size*size + 1);


Then, simply checking used[value] or used.get(value) will return whether the value has been used or not.  Set the flag for the value when you store it in the square[][], and clear it when you replace the value.  That one change will reduce your time complexity from \$O(N^6)\$ to \$O(N^4)\$.



The next speed up can come from the observation that, if you take a solved NxN magic square, and erased one row and one column, you could trivially recreate the erased values.  If you know N-1 values in a row or column, the remaining value must be the desired total less the sum of the filled in values.  1 + 8 + ? = 15 ... the missing value is 15-(1+8)=6!  Of course, since you are generating candidate values, you need to ensure the computed value is (a) possible, and (b) unused.



Adding up numbers takes time.  Why keep adding the values?  You could keep a running total for each row and column:

square[x][y] = value;
row_sum[x] += value;
col_sum[y] += value;


... of course, you need to subtract the value out when backtracking, or replacing with a different candidate value.



Magic Squares are horizontally, vertically, and rotationally symmetric.  In a 4x4 magic square, there are only 3 unique locations the number “1” may appear in.  The remaining 13 locations would all correspond to simple rotations or mirroring of the square.  This would reduce the possible 4x4 squares from 16! permutations down to 3*15! ... an 81% reduction.  However, you are not finding all permutations; you stop once the first magic square is found, so this reduction in search space likely won’t produce much savings, if any.



While an 8x8 magic square seems huge, it is still within the realm of possibility.  The magicNumber, however, would be 260 which is too large for a byte.   Limiting the values themselves to a byte restricts the square to 15x15, and may be reasonable, but the sum should probably be an int. 



This code ordering seems reversed!

    if (isValidRow(x) &amp;&amp; isValidCol(y)) {
            square[x][y] = i;


square[x][y] should be filled in before the isValid checks are done.  Otherwise, an invalid state will prevent updating the square to a valid value. 

“Invalid”, in this case, only happens if the sum becomes too large, and subsequent values will only make matters worse, but if the code is relying on that, it should break out of the candidate values loop once an invalid state is reached, instead of continuing with the next value.