Make a diagram like this:
The area of the entire square is (a+b)2=a2+b2+2ab
The area can also be represented as the sum of the area of the 4 triangles and the square in the middle: c2+2ab
Since they both represent the area of the square, we have the equation a2+b2+2ab=c2+2ab
Subtracting 2ab from both sides gives us a2+b2=c2