The poem "If" is a didactic poem. It teaches a lesson about life. The speaker in the poem is instructing his son on what to do and not do to obtain or inherit the earth while he becomes a man.
The speaker uses seemingly contradictions of ideas, yet the paradox of ideas works:
Kipling creates a paradox (the combination of mutually exclusive ideas that, while seemingly contradictory, serve to make a point in their contradiction) that is characteristic of the tone of the entire poem.
If the son can have self control along with his self confidence, he will be the wiser and inherit the earth. If the son can have patients and "If you can wait and not be tired by waiting," then you will inherit the earth. If the son can rise above the fact of losing it all and having to begin again, then the son can inherit the earth:
And lose, and start again at your beginnings,
And never breathe a word about your loss:
If the son can hold on when all in him says to let go, then the son can inherit the earth:
If you can force your heart and nerve and sinew
To serve your turn long after they are gone,
And so hold on when there is nothing in you
Except the Will which says to them: "Hold on!"
Truly, the poem "If" is a lesson about what is important in life. It teaches the son that there are some things worth fighting for. It teaches the son that self control and the will to hold on will make him a winner.
If the son can learn to be humble in all walks of life, he will inherit the earth and become a man. If the son can learn to not allow friends nor foes to hurt him, he will be a strong man:
If you can talk with crowds and keep your virtue,
Or walk with Kings---nor lose the common touch,
If neither foes nor loving friends can hurt you,
If all men count with you, but none too much:
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!
No doubt, Kipling's message is to learn to make the best out of life. Having all of the qualities and characteristics mentioned in the poem will make a man out the son and he shall inherit the earth.
Truly, the overall theme is one of manhood and leadership. The speaker is teaching his son what it takes to become a man. He also emphasizes that his son will inherit the earth if he learns the valuable instruction of the poem.