Four square miles is an area (of any shape) that measures four square miles. It could be a square of two miles by two miles. Or any other shape that contains a four square mile area.
Something four miles square is a square plot of land four miles on a side. That would be sixteen square miles.