What is the context of the poem "If?"
This is a great question!
Rudyard Kipling's famous poem, If, was inspired by Leander Starr Jameson, a military leader who led a failed raid on the Transvaal Republic in 1895.
The poem basically consists of an unknown speaker giving advice to a young boy about how to become a man which is why it's often read at graduation and commencement ceremonies. It's pretty much just 32 lines of life advice.
While the first 3/4 of the poem consists of "if" statements, the last few lines are where the poem's true message is found.
There, Kipling says, "If you can fill the unforgiving minute/With sixty seconds' worth of distance run,/Yours is the Earth and everything that's in it,/And - which is more - you'll be a Man, my son!" (Kipling, 29 - 32).
When simplified, If isn't really too difficult to understand. The only thing you're required to do is analyze, and understand, the qualities being described in each hypothetical "if" situation.