"The White Man's Burden" expresses the idea that imperialists are engaged in a noble but thankless task. The native peoples they colonize will, Kipling argues, benefit. But they will hate the imperialists. Only other imperialists (in this case, the British) will understand and respect those who take on the burden.
In essence, the argument is that native people aren't competent to rule themselves. The imperialist is acting selflessly, taking over in order to deliver the benefits of Western civilization. But, like unreasonable children, the natives will resent being controlled.
To understand this point of view -- which is today recognized as racist -- it helps to consider the historical context. Kipling wrote this poem for the express purpose of persuading the United States to act as an imperial power in the Philippines. Many citizens, like Mark Twain, opposed this. They believed that the Philippines should be left to rule itself.
But Kipling argued that the United States had a moral obligation to take on the duties of a colonial power. As he wrote in a letter to Theodore Roosevelt, the United States had created this obligation when it ended centuries of Spanish control over the islands. The Philippines were in disarray, and Americans bore responsibility for improving things:
"America has gone and stuck a pick-axe into the foundations of a rotten house, and she is morally bound to build the house over, again, from the foundations, or have it fall about her ears."
What exactly were Americans supposed to build? Kipling envisioned a mix of tasks, some of which we'd recognize today as humanitarian. His poem makes reference to ending hunger and providing people with medical care ("Fill full the mouth of Famine / And bid the sickness cease"). He also alludes to ending warfare among different factions in Filipino society, and creating the infrastructure of civilization, like better ports and roads:
"Take up the White Man's burden, No tawdry rule of kings,
But toil of serf and sweeper, The tale of common things.
The ports ye shall not enter, The roads ye shall not tread,
Go make them with your living, And mark them with your dead."
But again and again, Kipling makes it clear that the native people -- whom Kipling describes in patronizing, racist terms ("half-devil and half-child") -- will resist and resent imperial efforts. He writes sarcastically of how the imperialist will be "rewarded" by "blame of those ye better, The hate of those ye guard."
Kipling's words suggest the analogy of a child being ruled by a parent. The parent toils for the child's own good, but the child doesn't understand that and is ungrateful. But the analogy doesn’t only apply to the relationship between the United States and the Philippines. In the final stanza, Kipling also suggests that the United States isn't quite grown up yet: Americans need to become a colonial power and assume imperial responsibilities. The British might not thank them for doing so, but they will respect them as peers who have taken on the noble burden.
Kipling, Rudyard (1990) The Letters of Rudyard Kipling, Thomas Pinney, Editor. London, Macmillan, Vol II, p. 350.