Hello and welcome to JustAnswer. Please note: This is general information for educational purposes only and is not legal advice. No specific course of action is proposed herein, and no attorney-client relationship or privilege is formed by speaking to an expert on this site. By continuing, you confirm that you understand and agree to these terms.
I am sorry to hear about this situation. In cases like these, both parents have rights to the child and are expected to share the child's custody. However of course this often does not work out. One parent would begin "hiding" the child or denying custody, and without a court order, there is no way for the other parent to enforce the matter. So this often ends up in court, either as part of a divorce or a separate matter by itself.
A parent can file for custody of the child. While the suit is pending, the parent may also ask for temporary orders to be filed which would be heard faster, and re-considered at time of trial.
The Court decides on custody based on the rule of thumb of "best interest of the child." This includes, but is not limited to, general stability of the parent, financial stability, indoctrination of the child in the current school and environment, household condition and living condition of the child, other persons living in the house, etc. The courts generally do not like to split the custody 50/50 since this is hard on the child unless both parents agree to this.
One parent usually becomes the custodian and the other parent becomes the "visiting" parent which is generally one day a week, every other weekend, and alternating holidays. The nuanced points of the custody can either be decided by the parties or the Court, if the parties cannot come to an agreement.
Even if a parent does not get managing custody, they are almost guaranteed visitation unless they have a drug problem, alcohol dependency, or an unsafe home environment. Abuse and or neglect of the child or previous children are an almost automatic bar for even visitation, although supervised visitation may be granted by the Court.
Of course, that is the standard order of possession. That order can be modified if both parties agree or if the Court finds that it is an extraordinary situation.
Ergo, someone in your situation may wish to consider filing for custody of the child.
I hope this helps and clarifies. Please use the SEND or REPLY button to keep chatting, or please RATE when finished. You may always ask follow ups at no charge after rating. Kindly rate my answer as one of TOP THREE FACES/STARS and then SUBMIT, as this is how experts get credit for our time. Rating my answer the bottom two faces/stars (or failing to submit the rating) does not give me credit and reflects poorly on me, even if my answer is correct. I work very hard to formulate an informative and honest answer for you; please reciprocate my good faith with a positive rating.