A hymn was a type of song or poem written to praise a god.
Some examples of hymns included "Amazing Grace" and "Jerusalem" (pertaining to the Christian God), as well as the Homeric Hymns (pertaining to the Greek gods). (Star Trek II: The Wrath of Khan; DS9: "Explorers"; TNG: "Darmok")
The Bible also contained hymns in the book of Psalms, including Psalm 95. (TOS: "The Empath")