The LORD is my shepherd;
I shall not want.
He maketh me to lie down in green pastures;
he leadeth me beside the still waters.
He restoreth my soul;
he leadeth me in the paths of righteousness for his name's sake.
Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me;
thy rod and thy staff they comfort me.
Thou preparest a table before me in the presence of mine enemies: thou annointest my head with oil;
my cup runneth over.
Surely goodness and mercy shall follow me all the days of my life;
and I will dwell in the house of the LORD for ever.
David, himself a shepherd boy, claimed that as his sheep were to him (he took care of them) so David was to the LORD (Jehovah). The LORD took care of David's physical needs (food and rest), protected him from danger (although he did have to walk through it), and would let him dwell in his eternal home.
Many of us claim to have this same relationship with the LORD through Jesus, of whom it was said "God so loved the world that he gave his only begotten son, so that whoever should believe in him would not perish but have eternal life" (John 3:16). This does not mean intellectual belief, but actually putting our confidence and trust in Jesus.