Most states laws provide that a court is to award custody based on the best interests of the child. State laws allow a court to consider numerous factors to determine the best interests of the child. Many states begin with a presumption that it is best for the child to maintain continuous contact of some sort with each parent.
The parent who does not receive legal or primary custody usually will have reasonable visitation rights. This may include every other weekend, some holidays, and time in the summer.