The Greek term we get our word hypocrite from literally means a stage actor, somebody who puts on a mask to play a part. Jesus used the term three times in Matthew 6 to describe the self-righteousness of the scribes and Pharisees (see vv. 2, 5, 16). Their so-called righteousness was all outward, not inward.
In contrast, Jesus spoke to the people about how to be genuine followers of the Lord: "Take heed that you do not do your charitable deeds before men, to be seen by them. Otherwise you have no reward from your Father in heaven" (v. 1). Whenever you do something good, you are typically being watched to some degree. That can be dangerous because the flesh loves to be admired, and that can become your motivation. There's nothing wrong with getting encouragement, but if you're doing something simply to be told you're wonderful, then it's a problem.
The Greek word for to be seen, theaomai, is where we get our term theater. It means doing something in a way that commands attention. But here's the deal: you're either going to get a reward now—being noticed by man—or you can wait and let God reward you. And from what I've read, He does a way cooler job at rewarding you than anything we could do on earth.
"Therefore, when you do a charitable deed, do not sound a trumpet before you as the hypocrites do in the synagogues and in the streets, that they may have glory from men. Assuredly, I say to you, they have their reward" (v. 2). In other words, if you do stuff to be seen by people, God owes you nothing. That's the danger of doing anything public, including public ministry.
Everybody loves to be encouraged for something they did, but sometimes when that happens to me, this little part of me says, "Man, I just lost that reward in heaven." The way I figure it is that if you work diligently and faithfully behind the scenes where nobody notices you, I expect to see you in the front row in heaven. But if you want to find me, you'll have to go way in the back somewhere.
Jesus went on to say, "When you do a charitable deed, do not let your left hand know what your right hand is doing, that your charitable deed may be in secret; and your Father who sees in secret will Himself reward you openly" (vv. 3-4). As Paul wrote, "Let each one give as he purposes in his heart, not grudgingly or of necessity; for God loves a cheerful"—or, literally, hilarious—"giver" (2 Corinthians 9:7).
What you do and how you live now is either building up your treasure store in heaven or depleting it. When you choose to serve God and His people with a pure heart, you're making deposits into that store. I pray the Lord would help you not to be motivated by carnal, fleshly desires, but to be able to live contentedly with the knowledge that God saw what I did, God knows what I give, and there is a reward waiting for me in heaven.