What does getSquare (Math _ square _) = square mean?
A pattern is a way of deconstructing an object into its constituent parts and bringing some of those into scope.So (Math x y z) is a valid pattern, which would bring these values into scope: x=1, y=2, z=3. In this case I'm bringing only the second argument into scope. In a pattern, _ means "ignore this argument".
Here is a short interactive lesson on pattern matching: http://tryhaskell.org/#19