The custodial parent is the legal parent of a child that is primarily responsible for the caretaking functions of a child. In other words, the custodial parent is the child's main caregiver. The other legal parent of the child would be called the non-custodial parent.
One can become the custodial parent by having a judge grant one primary custody over a child in court. This court order is referred to as a parenting plan.
Two parents that have joint-custody of a child would both be considered the child's custodial parent.