The Child Abduction Convention does not define habitual residence. It is up to the judges in the different countries to interpret this.
The European Court of Justice has given the following interpretation:
A child’s habitual residence corresponds to the place where in fact the center of his life is located. The judge must determine where that center is located by reference to a series of corresponding factors.
It is the place that expresses a certain integration of the child in a social and family environment. To this end, the duration, regularity, circumstances and reasons for the stay in the territory of a State and for the family’s move to that State, the child’s nationality, the place where and the conditions under which the child attends school, language skills and the child’s family and social ties in that State must all be taken into account, among other things.