This quote means that if you keep trying the same thing, but expecting different results, then that is not going to work. This is because if you keep doing the same thing, the result will stay the same. Insanity, in this context, means that it is not a sensible thing to do because it will not lead to the desired outcome.