You have to learn a few things, which you do along the way, but basically, poetry is a matter of the ear. Iambic pentameters or what constitutes a stanza comes naturally - your ears will know.
Vikram SethEvery object strives for its proper place. A book seeks to be near its truest admirer. Just as this helpless moth seeks to be near the candle that infatuates him.
Vikram Seth