Psalm
A "psalm" is not really a form, it's more of a genre. The psalms are considered "praise songs" (see "What's Up with the Title? for more), and they were probably meant to be sung as music. But this is not exceptional: a lot of ancient poetry takes the form of song. The classical symbol of poetry is the lyre, a harp-like musical instrument.
The Biblical Book of Psalms includes diverse group of works, but as a whole they are intense personal expressions of devotion. They're expressions of feeling and not so much doctrine or theology, though of course theologians have been poring over them for literally thousands of years now. Many of the psalms are addressed directly to God. Not all of them are expressions of praise of God's glory, but Psalm 23 certainly is.
The translation we use comes from the famous King James Bible, completed in 1611 in England. While the King James Version has often been supplemented by newer translations that are thought to be more strictly accurate and are written in modern speech (no "thy" to be seen), the King James Version's poetic brilliance is on fine display in this psalm.
Following the tradition for putting together the Bible, each full sentence of the psalm is considered a separate "line" (or verse). It's best not to worry too much about line breaks – they're not really a part of the meaning of poetry composed around this time around.
Meter, on the other hand, plays an important role in making this translation great. The King James Version of the Bible was created in Shakespeare's time, when some of the greatest masters of poetic meter were at work. While Psalm 23 does not follow any particular metrical form, it contains many examples of anapests, or two short beats followed by a long one (da da DUM). The most famous example is in line 4:
though I walk through the val-ley of the sha-dow of death
Those anapests just pile up one after another to form a memorable musical phrase (just ask Coolio). See how many other examples of anapests you can find. It's interesting to think how much the traditions of English poetry have influenced the way we read a religious text originally composed in Hebrew!