A nice visualization/example of the kernel trick. A more mathematical explanation can be found here.