If a father has a child without custody and he goes to jail does the mother get him back?

The mother has the right to claim the child as the legal guardian of the child.