The vast majority of the Tanakh is prose, written in a straightforward manner, with the words written together in close proximity, and paragraph and chapter breaks added within the text as necessary. On occasion we find poetry and songs in the Tanakh, which are distinguished by the manner in which they are written.
Rabbi Hanina bar Pappa quotes Rabbi Sheila ish Kefar Timarta who points out that the main method of presentation for songs and poetry in the Tanakh is ari’ah al gabei leveinah – like brickwork, with alternating long and short lines set up like a building. A classic example of the ari’ah al gabei leveinah system is Shirat haYam – the Song of the Sea. As is evident from looking at the Biblical text as it appears in the written Torah (Shemot 15) the song leaves large spaces between words and is clearly different from your standard page of prose.
Rabbi Sheila ish Kefar Timarta does note that we find another method of writing songs in the Torah, ari’ah al gabei ari’ah – when the “bricks” are piled up with one directly above the other. Such a system is found in Megillat Esther, in chapter 9 when Haman’s sons are hanged and in Sefer Yehoshua (chapter 10) where we find a celebratory list of the Canaanite kings who had been conquered by Yehoshua and the Children of Israel. As Rabbi Sheila ish Kefar Timarta explains, the difference between these songs is that unlike the ari’ah al gabei leveinah, the ari’ah al gabei ari’ah is not a sturdy structure. Since these songs celebrate the downfall of the enemies of the Jewish people (as opposed to Shirat ha-Yam whose focus is on the miracles wrought by God on behalf of His people), they are set up in a way that testifies to the permanent downfall of these evil people, who should never recover from their defeat.