Make a square of length 'a' and draw a square of length 'b' inside the first square so that the edges overlap. Name the first square as ABCD and the second one as AEFG with AE on AB and AG on AD. Produce EF to meet CD at H and GF to meet BC at I. Then
$$a^2-b^2=[ABCD]-[AEFG]$$ $$=[EFIB]+[DHFG]+[FICH]$$ $$=2b(a-b)+(a-b)^2$$ $$=(a-b)(a-b+2b)=(a-b)(a+b)$$
where [] denotes the area of the figure.
You can also rotate and translate FGDH so that FH coincides with CH. Then EBGD becomes a rectangle.
$$a^2-b^2=[EBGD]=EB*ED=(a-b)(a+b)$$
Other algebraic identities can also be found using this method like for $(a+b)^2,(a-b)^2,etc$.