Thank you for entrusting me with your question. I am an attorney licensed and practicing family law
in California, and I have handled hundreds of custody cases. The only circumstances where a child can be taken out of the custody of a parent is through an order of the court. There are two types of custody orders: (1) emergency, and (2) regular.
An emergency custody order will only be awarded if there is an imminent danger of significant and irreparable harm to the child; before an emergency custody order is granted, the parent will be given 24 hours notice to appear in court and explain why the emergency order should not be made. If the emergency order is granted, the court will temporarily
take the child away from the parent. The parents will then meet with a mediator and, a there will be a regular court hearing a few weeks later--both sides will be given the opportunity to explain what is in the best interest of the child
With a regular order, the parties will meet with a mediator and later meet at a court date--both sides will be given the opportunity to explain what is in the best interest of the child. The only difference between an emergency custody order and a regular custody order is the emergency custody order is granted on very short notice, it is granted temporarily, and it is only granted when there is a risk of significant, immediate, irreparable harm.
Nothing happens unless both sides have been given notice of a court hearing and have been given the opportunity to be heard.
I understand that you may have follow-up questions. Let me know if further clarification is needed. Thank you.