The nukekubi are a sub-species of the rokurokubi whose heads come off and float about. They are even considered to be the the earlier tradition of rokurokubi.
The nukekubi are evil spirits who attack at night and drink their victims' blood. They are only seen when the head is separate from the body. When the nukekubi is sleeping and only its head is moving, if the body moves then the head cannot be re-united to the body.
The act of the head separating from the body represents the spirit's soul wandering. Some people in stories involving nukekubi are afflicted with an illness where they have become the nukekubi.