If both partners are legal parents of the child -- either because they are both biological parents, because they have jointly adopted, or because a nonbiological parent has obtained a legally valid second-parent adoption -- both parents usually have an equal right to custody of the child. This means that neither parent may deprive the other of physical custody or visitation unless a judge makes an order granting sole custody to one parent. If a court does grant one parent physical custody, the other parent is usually entitled to visitation and is next in line to exercise physical custody rights if the custodial parent becomes unable to care for the child.
Of course, the right to be considered a full legal parent of a child can be lost if a parent fails to exercise parental responsibilities. For example, all legal parents have a duty to support their children, whether or not they have physical custody of them. The key is that, if you are not the parent with custody, you must stay involved with your child -- visiting and providing support -- to the best of your ability.
Legal parents can learn more about custody, visitation, and child support laws by visiting the Child Custody, Child Support & Visitation area of Nolo's website.
If a partner is not a legal parent of the child, the partner may not have any legal rights to parent or even visit the child after a break-up. Ideally, if a partner wants to continue to be part of the child's life, both members of the couple will make and honor a workable agreement about how each will continue to parent, including how they will handle visitation and support.
If separating partners can't reach an agreement and one of them wants to petition a court for visitation, the outcome will depend on state law. Not long ago, almost all states would have denied a nonlegal parent any right to see the child of a former partner, no matter how close the parent had been to the child while they were living in the same house, but this rule is changing as many state courts recognize that the best interests of the child may make visitation with a nonlegal parent desirable. Because this area of the law is in constant flux, you'll want to research your state's law or visit a good family law attorney for guidance.
For more information on parenting for unmarried couples, see Living Together: A Legal Guide for Unmarried Couples, by Ralph Warner, Toni Ihara, and Frederick Hertz (Nolo), or A Legal Guide for Lesbian & Gay Couples, by Denis Clifford, Frederick Hertz, and Emily Doskow (Nolo).