The best interests of the child is the legal standard that a judge uses to determine what is the best course of action for children in a divorce or separation case. Where parents cannot agree between them where the child should live and other pertinent details over the children's lives, the judge has to make a determination and will compare each parent's abilities based on the best interests of the child. Generally this means an environment that is safe and conducive to learning; if either parent has a history of drugs or alcohol it would be ruled that the best interest of the child would be to be kept away from any negative situation.
Many times, parents try to prove that the other parent cannot provide the same level of support for their child through attempting to show that the circumstances are different in the households and better in one than they are in another. If a house is overcrowded or substandard, or if the parents do not work due to laziness or are in trouble with the law, it could be deemed by the judge that it is the best interest of the child to keep the parent that exhibits the negative behavior at length or supervised with the child.