In California a parent has the right (1) to be legally recognized as the parent of a child, (2) to have a parental relationship with the child, and (3) to provide physical, emotional, and financial support to the child. There are two types of parental relationship: natural and presumed parentage.
Both parents may have signed a Voluntary Declaration of Paternity at the hospital when the child was born or paternity may also be established by filing a Petition to Establish a Parental Relationship and bringing the case before a judge.
In California, custody laws are based on the principle of promoting the best interests of the child. This means that a custodial parent should be determined based on what is in the child's best interest rather than favoring one parent over the other.
You and the other parent can establish legal parentage for your child without going to court if you both parents sign a Voluntary Declaration of Parentage (VDOP) form and file it with the state. This form is usually signed at a hospital when a child is born. But you can sign it later.