“There is nothing outside a person that by going into him can defile him, but the things that come out of a person are what defile him.” (Mark 7:15, ESV)
What Jesus was addressing here refers back to the beginning of Mark 7, the Pharisaical rules, particularly the ones concerning ceremonial washing and the washing of hands. We know that washing of the hands is important, especially before eating to avoid ingesting germs and toxins which can hurt us physically. This was not the reason why the Jewish leaders of Jesus’ day were scrupulous in their washing rituals: they believed that it in itself was an act that marked them as righteous and made them holy. And they taught others the same.
Jesus pointed out that, while these rituals and rule had the outward appearance of piety, they did nothing to change the heart attitude of a person. In fact, as Jesus maintained, those who advocated for them were hypocrites. They attempted to follow rules out of a desire to look good on the outside. On the inside they did not love God or their fellow man. Their hearts, the core of their being, was not holy at all, but corrupt, lacking in love and filled with all manner of evil thoughts that manifested in corrupt words, actions, and lifestyles. Jesus said that food, dirty hands and cups did not make a person unclean or unholy. The evil thoughts and actions that arise from the heart corrupt a person, not what came from outside. The heart needs to be cleansed to be made new. This is possible only by the power of God who grants us the faith we need to depend on Him for all things.