Poems are protected by copyright laws just as are novels, nonfiction books and other intellectual property. Copyright laws can be complex and it can be hard to know if your intended purpose is legal or not. Whether you intend to or not, infringement of copyright for a poem or collection of poems can bring a civil court action.
Individual poems may be copyrighted, according to the U.S. Copyright Office, or a collection of poems may be copyrighted. If you use a poem that is not copyrighted, you could still be in the wrong if it was published in a collection that is copyrighted.
Copyrights last for the life of the author and for 70 years after that. With works that are commissioned by an individual or organization, the copyright lasts for 95 years after the work was first published. If not published it can last for 120 years after its creation. Many poems are in the public domain. This means they can be used by anyone.
In copyright law there are laws governing "fair use." This means you may use the poem in a limited way without permission. The problem with this is that the definition of "limited" is not cut and dried. Fair use may apply if you are critiquing the work, or quoting it in scholarly writing, research or technical writing. Educational uses that are not for profit may be allowed as well as parody of the poem.
The U.S. Copyright Office will ascertain the copyright owner for a small fee. You may then write to the owner to seek permission to use the poem. This can be done if you are uncertain whether your intended use for poem is legal. The owner might charge you or give permission without cost. You can also search the records yourself in Washington, D.C. or online at the Copyright Office website.