Psalm 23, a hymn from the biblical Book of Psalms, begins with one of the most enduring metaphors in world literature. To the ancient writer of this hymn of faith and praise, God is not a stern and distant king, but a humble, gentle shepherd. By implication, the speaker is a sheep, one of the "flock" of humanity.
This line is so famous and familiar that at first it might be hard to see how strange it is. Perhaps the best way to see it fresh is to think a little harder about the words "Lord" and "shepherd."
The connotations of "Lord" are all to do with power and authority: a lord is a noble person, the master of his domain. But when this psalm was originally written in Hebrew (likely sometime between 500 and 100 BCE), the word translated as "Lord" here was in fact the Tetragrammaton—that is, the sequence of four Hebrew letters sometimes given as YHWH or Yahweh in English. This solemn and holy name was God's answer when the prophet Moses asked God what he was called: it's a word that suggests a direct and awesome encounter with the creator of the universe.
Shepherding, in contrast, was the humblest of jobs. When this psalm was written, shepherds would spend most of their time living out in the open with their sheep, protecting them from predators. And shepherding was one of the most common ways for the people of the ancient Middle East to make their living. To say the Lord was your shepherd would have been rather like saying the Lord is your accountant or your construction worker or your grocery clerk.
In other words, this metaphor—the first in a poem that will be built almost entirely out of metaphors—unites the transcendent with the everyday. If the Lord is a shepherd, he's as down-to-earth as you can get. And he's protective. As the speaker goes on to say, with the Lord as their shepherd, they "shall not want"—they won't lack anything. The speaker's almighty God, in other words, is a daily protective, nourishing presence, a caretaker.