As a parent you have many options in a child custody battle. It is best to find a common ground solution between you and your ex-spouse in order to preserve the best interests of the child. But if it comes to a legal battle, just remember that the court will try to find the situation that is best for the child.
Your options depend on your status as a parent. On this site, we deal mostly with biological parents. This means the man whose sperm, or the woman whose egg or eggs, helped create the child or children in question. Under the law, the biological parents are the people who have a legal right to claim custody of the children.
This right can be given up of course. This is the case under adoption, where the parent or parents legally relinquish all claims to custody, visitation, etc. of their biological child. The right is also given up in cases of sperm donors. In such a case the man relinquishes all rights to the product of the sperm he gives up. In these cases the biological parent has no claim to the child.
This leads us to legal guardians, or parents. Such persons are given the right of custody and visitation by law, though they are not the biological parents. In adoption the new parents take on the rights of biological parents. There are cases of biological parents trying to regain their parental rights after relinquishing them by adoption or sperm donation, but such cases are highly fact sensitive. Just know that it is extremely difficult to regain custody or visitation when it has been relinquished in an adoption or sperm donation.
This site gives specific information that will help educate you on your options.
See Child Custody Types and Classes for more information on this subject.
Image by: dcysurfer