A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown  at sacred-texts.com
psa 24:1God's supreme sovereignty requires a befitting holiness of life and heart in His worshippers; a sentiment sublimely illustrated by describing His entrance into the sanctuary, by the symbol of His worship--the ark, as requiring the most profound homage to the glory of His Majesty. (Psa 24:1-10)
world--the habitable globe, with
they that dwell--forming a parallel expression to the first clause.
psa 24:2Poetically represents the facts of Gen 1:9.
psa 24:3The form of a question gives vivacity. Hands, tongue, and heart are organs of action, speech, and feeling, which compose character.
hill of the Lord--(compare Psa 2:6, &c.). His Church--the true or invisible, as typified by the earthly sanctuary.
psa 24:4lifted up his soul--is to set the affections (Psa 25:1) on an object; here,
vanity--or, any false thing, of which swearing falsely, or to falsehood, is a specification.
psa 24:5righteousness--the rewards which God bestows on His people, or the grace to secure those rewards as well as the result.
psa 24:6Jacob--By "Jacob," we may understand God's people (compare Isa 43:22; Isa 44:2, &c.), corresponding to "the generation," as if he had said, "those who seek Thy face are Thy chosen people."
psa 24:7The entrance of the ark, with the attending procession, into the holy sanctuary is pictured to us. The repetition of the terms gives emphasis.
psa 24:10Lord of hosts--or fully, Lord God of hosts (Hos 12:5; Amo 4:13), describes God by a title indicative of supremacy over all creatures, and especially the heavenly armies (Jos 5:14; Kg1 22:19). Whether, as some think, the actual enlargement of the ancient gates of Jerusalem be the basis of the figure, the effect of the whole is to impress us with a conception of the matchless majesty of God.