"If" is a series of statements given by a father to his son. The father's purpose is to give the boy advice about behaviors that will serve him well in his future dealings with other people.
The advice is given through a series of scenarios in which the father presents a way of acting or relating to others that is not constructive or helpful, then contrasts it with the positive way of handling the situation. The father never directly forbids his son to act in the counterproductive manner; he simply suggests that there is another way that will be more helpful for the boy and for those around him.
The father summarizes by telling his son that if he is able to successfully shape his behavior and responses along the constructive patterns presented in the poem, that all the Earth and all the respect of others will be accorded to the son and that, even more important, "you'll be a Man, my son!"