This is a "song of ascents," so called because it was sung while ascending Zion to the tabernacle (or, later, the temple). In using this particular psalm the worship leader wanted the people to come in an attitude of awe and reverence, with a realization that God was to be approached only with clean hands, hearts, and minds.
He begins by having the people think about just Who it is they are approaching. In a relatively quiet, awed voice he sings, "The earth is the Lord's and all its fullness, the world and those who dwell therein." So the people are reminded, even as they approach, that they are the property of Jehovah, and that all around them belongs to Him as well. He made everything, and everything and everybody are His.
So then, who may come into the majestic Presence of such a God? Everyone is thinking about that question. At least for one moment, all the people are made aware of the fact that God sees them, that He CARES how they live, that every action and every thought passes before His all seeing eye.
He cares whether they have "clean hands and a pure heart." He cares, in other words, what they've done with those hands, and He cares why they've done it. Have those hands helped the needy? Or have they robbed widows? To put it in modern terms, have they taken more money than they should really have taken? Have they sacrificially cared for those more needy than themselves? Have they been completely honest in all their dealings? And what about their hearts? Are they inclined to care about their thoughts as much as the Lord cares? Simply put, do they love Him first of all? Or are they involved with desire to please someone other than God first (idolatry). Do they desire things more than they desire to please God? In plain words, do they go about each day seeking to do those things that please Him?
If they pass these tests, then they "shall receive blessing from the Lord and righteousness from the God . . . of salvation." Such hearts and lives, sings the leader, characterize true Israelites ("Jacob, the generation of those who seek Him")
But then comes the realization that, in the final analysis, only the Lord Himself and His Messiah pass the test. Only He is holy, and in fact, He's the King of holiness, the "King of glory!" He deserves all the people's praise as they come into His house, and, particularly as Messiah, He deserves to enter the gates as the owner of the palace! The "Lord of hosts, He is the King of glory!" Having sung this praise, the people are then and only then ready to enter the Presence of that King.
So it is for us, too, whenever we come into our Lord's special presence among His people. How do you come? Do you come quietly, with the realization that He is there? Are you clean in the cleanness of Jesus Christ?
Do you realize, as you open your eyes each morning, that you are even then coming into the very Presence of the Holy One of Israel? Do you realize that He actually cares what you do, what you think, what's in your very heart of hearts? Are you ready to come before Him, to pray, to worship, to live the day in His sight? Oh how we should pray with our Lord, "Lead me not into temptation, but deliver me from the evil one, for Thine is the Kingdom, the power, and the glory forever. Amen"