Humma is prepared to give this infocube to Zaphod on two conditions: he wants Zaphod to bring him back a special gun from Magrathea and he wants a hostage to ensure that Zaphod returns. In an early draft this was to be Trillian, but now he takes Zaphod's second head (we see a silhouette of Zaphod strapped down and Humma advancing with a circular saw, and Zaphod wears a neck bandage afterwards).
The head is left attached to a dancing hula doll - I have no idea what the hell that is all about - and we never ever find out what happened to the occasionally glimpsed third arm which is presumably removed at the same time because Zaphod later says of the Heart of Gold that he needs his third arm to operate it. We'll come to the subject of Zaphod's heads in a moment.