Time complexity is a measure of how long a computation takes to execute. For a Turing machine, this could be measured as the number of moves required to perform a computation. For a digital computer, it could be measured as the number of machine cycles required for the computation.
Space complexity is a measure of how much storage is required for a computation.
Both of these measures are functions of a single input parameter, the size of the input. Again, this can be defined in terms of squares or bytes. For any given input size, different inputs typically require different amounts of space and time. Hence we can discuss for either the average case or for the worst case. It is usually much easier to compute worst-case complexity.