I do have some experience in this regard. My family has been involved in the foster care system in Kansas for about 15 years, I have two sets of cousins that are also involved, and my aunt and uncle were for a number of years before my parents became foster parents. I also feel compelled to briefly defend the foster care system for a moment as I feel the abusive foster home troupe to be a bit outplayed. While such homes do exist, I have never talked to a kid (over 100 have passed through my parents home) and none have ever described any kind of abusive foster care system. I do personally know of a situation where a family of 5 children were in a foster home and the two oldest girls accused the FP's of abuse. An investigation was quickly carried out, records were checked, former kids were talked to, the three younger children were talked to and they were found innocent. However this almost drove these very loving people out of the foster care system.
Okay, derailment/rant over, back to the question.
In the situation you described, based on my experience in a small town (6,000), the police would round up the kid and first take him to the police station, there they would contact CPS or whatever private organization handles things (in my neck of the woods, two private orgs handle things, United Methodist Youthville and St Francis Community Services. There is also a hospital for troubled or suicidal children in need of more professional help called KVC, one of my roommates actually works for them as a type of orderly for lack of a better term). The police would then begin calling potential overnight foster care homes. Just FYI, during this time, the child usually has no idea what's going on, has brought nothing from home, no clothes, toothbrush, toys, etc. they are often scared, confused and lonely. In some communities, a local church(s) may have put together a sort of comfort box with needed items, toys, book, activities, etc. There are usually boxes for older teens as well, but like most things, they tend to gear toward the younger side.
Anyways, the police would locate a foster family (usually fairly quickly-in my town, again 6,000, the cops usually know who's house is full [CPS, except in extremely rare cases, won't allow more children in a home then there are beds and they do regular check ups to keep tabs. I've only seen this happen once and that was when there were 6 siblings I believe and 5 beds. One of the children was an infant and my parents keep a crib and that was set up in their room. Those children didn't stay long as they were quickly moved to a house with enough beds. Also any additions, major cosmetic changes to the interior, etc must meet their standards. For example, when my folks moved to their house in the country, they had to have certain windows in that would allow a child to climb out in case of an emergency. Another point of note, only certain approved babysitters are allowed to watch the kids, any natural or adopted children that may be in the house must also be vetted.]
Okay, where was I? Oh yes, the cops will usually know whose full and who has room and quickly calls someone. They will then drive the child to the overnight foster home. I've actually heard of this all being done in the car via cell phone.)
So the child is dropped off over night, and the next day an official case worker is assigned, interviews with the child are conducted and usually there is some sort of background check to determine if the child has any relatives. If they do, then the are usually shipped off to the relatives (I have a cousin that is a driver for the state and has driven kids to relatives or to the homes for visitations, etc.) or the relative comes and gathers up the child. This may take a day or two and usually the original foster home will put them up for a couple of days while things are getting sorted out. Kids don't go to school, if they go any where it's usually to their case workers office, the police (if a crime was involved and they need to be questioned), or to a therapist.
If a relative can't be found or can't/won't take in the child, their case worker will usually ask the original foster home if they are willing to take in the child. Then it is up to the foster parents to decide. Case workers also meet with their client on a weekly basis, sometimes in the home, sometimes in the office, sometimes over a Coke or Starbucks or something like that. The child also usually has a therapist assigned.
There was one case, where a mother, addicted to drugs, gave birth at the hospital. CPS was called, as the baby was being flown to a major medical facility. My folks were then called and asked if we would take in the baby. After about a week, the hospital agreed to release the child and my mother spent a night or two by his bed, learning, asking questions, getting instructions, etc. She then drove the baby back to our home. We had that child for almost 2 years (due to court battles with the mother, the father, and an original adoptive family dropping out). Thankfully a family was found and my parents were able to adopt their first grandchildren (the family agreed that it was for the child's best insterst, and my folks ended up "adopting" the whole clan of kids as grandkids.)
There are cases, usually in abusive situations or because of gangs, etc., the child is transferred to a foster home in a different town or different part of the state. Again, this is usually traumatic for the child as they are being placed in a home they don't know, with people they don't know, in a town they don't know, away from their school, friends, etc. I've even seen firsthand, situations where Hispanic kids are placed in a home where the kids speak no English and the parents speak no Spanish. In that situation, my brother (who is of Hispanic descent and works at a Mexican restaurant where the back of house staff speaks very little English) translated as he lived at home at that time. A lot of Dora and Deigo was watched as well. My parents would ask my brother for specifics on how to say certain words. I think they were asked, in that situation, because the case worker knew my brother was living in the home and spoke semi-fluent "restaurant" Spanish.
Hope this helps and I didn't give TOO much information out. I tried to speak in as many generalizations as possible while still giving examples because many times cases are sensitive and confidential. We have to be careful with photographs, videos, etc and can't post them on Facebook, Instagram, Twitter, etc. in some cases.