The chapter
Simply Six verses and two pictures. For four of them God is a shepherd and the speaker is a sheep; for the last two God is a host and the speaker is a guest at his table.
Context The psalm is headed as David's. Shepherd language runs through the Old Testament for kings and for God, and the gospels put it in Jesus' own mouth.
Verse 4
Simply The turn of the psalm: it stops speaking about God and starts speaking to him, exactly where the road goes dark.
Context The rod and the staff are a shepherd's working tools, not symbols. They are what an animal in the dark would actually feel against its side.