http://stage.liftonline.org/guides/show.php?id=120#q-1468
If only "informal" custody, cannot make important decisions for child.
To get custody, you must go to Family Court and file a petition for custody... You will have to serve the parents of the child with court papers letting them know that you are asking for custody... The incarcerated parent can be brought to court when the case is before the judge and can tell the judge what he or she wants to have happen.
When a judge is deciding a custody case between a parent and someone who is not a parent, different things will be considered. First, the judge will decide whether there are extraordinary circumstances (such as abuse or neglect, domestic violence in home*, unable to care for child because in jail).
*GR has been charged with murder of his wife -- if that doesn't count for domestic violence in the home, what does?
If there are extraordinary circumstances, the judge will decide what is in the best interests of the child.
In New York State, there are very few differences between guardianship and custody. However, in other states, there are big differences between the two. If you are planning to move, you should find out about the laws in the state where you are going. This will help you decide whether you should petitionfor custody or guardianship of the child.
Sometimes courts prefer to give guardianship of a child rather than custody to people who are not parents, such as grandparents.
Can the incarcerated parent get the child back after he or she is released if I have custody or guardianship?
In order to regain custody or guardianship, the parent will have to file a petition in court to modify, or change, the order that you received. The parent will have to show that there has been a change in circumstances. This means that something has changed since the court made the order. The judge will decide based on what is in the best interests of the child.