One of the major themes of Heart of Darkness concerns a perceived/conceptual conflict between savagery and civility. The cannibals who make up Marlow's crew are one element within this conflict. And, yes, they are actually cannibals who Marlow believes have eaten human flesh.
Notionally (or abstractly), cannibalism also becomes a sub-theme within the context of the savagery-vs.-civility conflict.
Whatever brutishness is associated with the cannibals in the novel can be linked also to the colonial interests that Marlow and Kurtz both represent.
“They were conquerors, and for that you want only brute force--nothing to boast of, when you have it, since your strength is just an accident arising from the weakness of others.”
The ability to exploit (by literally consuming a foe or by co-opting his life and resources) can be said to derive from the same source for each of these parties. (The morality of that exploitation is another question the text raises.)
We might look at the situation of colonialism and exploitation in the novel with an eye toward its irony in terms of cannibalism. After all, there is a reasonable question as to who is more humane - the cannibals who eat defeated foes or the Dutch who enslave, rob and belittle the Congo and its natives? Which party is the more "cannibalistic"? Which is more prepared to take humanity away from others, to feed upon the lives of others?
"European colonizers see them as a subordinate species and chain, starve, rob, mutilate, and murder them without fear of punishment. The book presents a damning account of imperialism as it illustrates the white man's belief in his innate right to come into a country inhabited by people of a different race and pillage to his heart's content" (eNotes).
While the colonizers accept their own behavior and, in doing so, deem it moral, the cannibals are seen as immoral. This judgement points to one of the deepest questions of the novel - where does morality come from and where does it end?
Kurtz takes the self-approving line of colonial thought to its absolute limit and then goes one step further, descending into madness and confusion. He has explored the limits of morality, becoming a "savage" along the way. Is his savagery immoral? His attempt was to find the base or foundation of morality, perhaps, and to establish a new order derived from that absolute.
The fact that he does not find it should have been clear to the reader from early on. Morality derives from a culturally specific reference frame. The cannibals see themselves as moral beings, despite a willingness to eat human flesh. The relativism of this notion underscores the troubling philosophical probing of the novel.
The cannibals are real. Marlow has hired a crewof natives who happen to be cannibals; however, he greatly admires them because unlike the white "pilgrims," these cannibals have "restraint," a quality Marlow deems very important. These cannibals have brought hippo meat wrapped in leaves onboard for their food; when this meat rots, these men are left without food, although Marlow notes they could have easily eaten the white men because the cannibals outnumber the whites. Their restraint is the quality that prevents them from devouring the white men.
When the boat is attacked shortly before it reaches Kurtz, the whites rush out of their cabins and begin firing their guns wildly even though they are unable to see their attackers. Their lack of restraint contrasts sharply with cannibals' calm demeanor. This ironic contrast reinforces Marlow's observation that the blacks in the Congo are not as savage as the civilized Europeans seem to be in their cruel mistreatment of the natives and now their intemperate firing at the bushes along the river. The natives are cannibals, but they do not behave as savages.