When the parents of a child are unmarried, even if the father's name appears on the birth certificate, the parties must have a ruling of parentage in order to get a judgment for custody or child support.
Parents can sign a Voluntary Declaration of Paternity before leaving the hospital, anytime after, or as part of a custody/support case. If the parties do not agree that both are the parents of the children then the court can order a DNA test.
You can do the case to establish parentage separate from a custody/support case or you can do them together. Any party that is declared a parent has the legal responsibility to support the child through child support as well as the legal right to visitation or custody.
It is also recommended that couples have a custody plan ahead of a break up that if you do breakup you can file for a stipulated order based on your agreement without having to fight it out. This will depend on your personalities though as the court will not enforce an agreement that was made before the breakup, but it can help both parties leave emotions out of it and think back to what they thought the best interest of the children was before they were mad at each other.