In Matthew 6:16-18, Jesus says:
"When you fast, do not put on a gloomy face as the hypocrites do, for they neglect their appearance so that they will be noticed by men when they are fasting. Truly I say to you, they have their reward in full. But you, when you fast, anoint your head and wash your face so that your fasting will not be noticed by men, but by your Father who is in secret; and your Father who sees what is done in secret will reward you,"
Most of this passage is fairly straight forward. When you are fasting as a spiritual discipline or private devotion to God, don't make a show of your fasting. Don't draw attention to it. In fact, go out of your way to keep people from knowing you are doing it. Keep it between you and God and trust God with your reward. Jesus makes the same point in this chapter about our personal prayers and our giving of alms. While much of worship is cooperate and done together with the church community, there are individual acts of worship that are private matters. That is what makes them acts of faith. If no one knows about them but God and we get no credit for them from men, then the only reason to do them is if we actually believe that God is really there and really does reward the faithful.
"Without faith it is impossible to please Him, for he who comes to God must believe that He is and that He is a rewarder of those who seek Him," (Hebrews 11:6).
But there is one aspect of this verse that is not immediately clear to us. Why does Jesus say that while you are fasting you should "anoint your head," (KJV, NASB, ESV) or "put oil on your head," (NIV, NRSV, HCSB). Is anointing one's head in oil a religious ritual to be done in conjunction with fasting? If so, how does that fit with keeping things secret? Isn't pouring oil all over my head going to draw a lot of attention to me and to the fact that I'm fasting?
The truth behind this is actually much more mundane and yet much more instructive. The oil was not ritualistic at all. The oil was a very practical element of daily life in the ancient world. One would anoint one's head with oil when sitting down to eat with others. It was hygienic and worked something like deodorant. The nice smell of the olive oil would cover up the other inevitable odors of living and working in an ancient, desert city. You actually see this practice mentioned several places in Scripture, such as when David writes using the language of the dinner table to reflect God's blessing on him, saying:
"You prepare a table before me in the presence of my enemies; You have anointed my head with oil; My cup overflows," (Psalm 23:5).
Or when Jesus rebukes the Pharisee and praises the sinful woman, saying:
"Turning toward the woman, He said to Simon, “Do you see this woman? I entered your house; you gave Me no water for My feet, but she has wet My feet with her tears and wiped them with her hair. You gave Me no kiss; but she, since the time I came in, has not ceased to kiss My feet. You did not anoint My head with oil, but she anointed My feet with perfume," (Luke 7:44-46).
Oil for the head was a basic part of sitting down together for a meal, and the Pharisee had been rude and inhospitable by not providing any. So when Jesus said to "anoint your head," or "put oil on your head," he was telling his disciples to go out of their way to look like they had been eating so that no one would ever guess that they were fasting. By doing this, they would keep their fasting "secret" between them and God alone, and therefore would receive no praise or honor from men. They would instead trust in God alone to reward what is done in secret.