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 SethI think if something is worth doing, it's worth doing well. And worth thinking about it as well.
Vikram SethIt's not the gods But our own hearts We need to fear. The evil starts Against all odds Not there but here.
Vikram Seth