Matthew 6:1-15 gives us a deeper glance at the righteousness that Jesus requires of those who would follow him. In the previous chapter, he has used some examples from the 10 Commandments, as well as other Jewish laws and in this section today, he gives a few more practical examples of what it means to be righteous; not because of what we do outwardly, but because of what’s in our heart.
The two examples he gives here in this particular passage are 1) giving to those in need, and 2) prayer, which are two things that Christians should regularly be doing. In summary, neither giving nor praying should be done with the motivation to be seen or praised by other people, but they should be done out of a heart that is humbled under God and grateful that they have such opportunities to give and to pray.