Lol at all the trolling responses as if this isn’t a totally legit question that’s plagued humans for as long as poetry has existed.
There are actually quite a few books out there about how to read and “get” poetry, but I found this one to be the most practical and helpful. Definitely worth a read.
In general though, I find the best approach to take is to slowly pick apart the grammar first, so that you understand what the poem is actually saying on the surface. This might take a while depending on the time period. Reading aloud and messing with putting pauses and emphasis on different words might help.
Once you’ve understood the superficial message of the poem, read it through again with the meaning in mind, focusing on how certain words might stand out or certain images appear especially vivid.
It’s usually best to read it aloud again at this point, and try to see how everything about the sound and meaning of the text—the rhythm of words, the images, and ways the sounds of words mix etc—contribute to or change the general superficial meaning you figured out at the start.