This is referencing Descartes's Evil Demon, from Meditations on First Philosophy, a thought experiment designed to give us a way to doubt absolutely everything, including even the laws of arithmetic, since it's possible that such a demon could be deceiving us. He ends up demonstrating that God is necessarily good, so would not allow such a demon to deceive us.