Answer:
Since you haven't included any details the following is general information. The parent needs to rectify the circumstances that resulted in their losing custody in the first place if custody was taken away by a court. If the parent voluntarily consented to the change in custody they can petition the same court to end that guardianship and restore custody in the parent.