How is poetry written?

Poems are made up of lines. Lines that are grouped in a poem are called a stanza. Most poems have a rhythm, which is created by the stressed (long) and unstressed (short) parts of a word, called syllables.
Structure of the poem: Poems can be structured, with rhyming lines and meter, the rhythm and emphasis of a line based on syllabic beats. Poems can also be freeform, which follows no formal structure. The basic building block of a poem is a verse known as a stanza.
The Owl and the Pussy-Cat
The Owl and the Pussy-cat went to sea
   In a beautiful pea-green boat,
They took some honey, and plenty of money,
   Wrapped up in a five-pound note.
The Owl looked up to the stars above,
   And sang to a small guitar,
"O lovely Pussy! O Pussy, my love,
    What a beautiful Pussy you are,
         You are,
         You are!
What a beautiful Pussy you are!"
Poetic elements: The poetry element builds a deep understanding of a particular poem or group of poems. The elements are voice, diction, imagery, figures of speech, symbolism and allegory, syntax, sound, rhythm and meter.

How does the poem differ from other literary genres?
Poetry is literature, but there are plenty of differences between the poem and a short story or novel.
Poems are an opportunity for an author to say what they want to convey through figurative language/figures of speech using a rhythmic pattern. Poems lead the reader through the topic quickly, expecting them to find the meaning within what they've read.
Pieces of prose are far more detailed and guided for readers. Most people avoid poetry because they don't understand it. But it's more about piecing bits of information together while combining with the author's experiences.
poem writing.jpg
The example of a poem writing from the lesson "A Short Monsoon Diary":
Winter Rains in the Hills

In the hushed silence of the house
when I am quite alone, and my
friend, who was here
has gone, it is very lonely, very quiet,
as I sit in a liquid silence, a silence
surrounded by the rhythm of rain,
the steady drift
of water on leaves, on lemons, on roof,
drumming on drenched dahlias and
window panes,
while the mist holds the house in a
dark caress.
As I pause near a window, the rain stops.
And starts again.
And the trees, no longer green but grey,
menace me with their loneliness.