If she were here, one of her relatives would have to petition to be appointed her legal guardian or to adopt her, otherwise the State would step in and take custody. If the court finds the petitioner an acceptable parent-substitute (is able to take care of the child, no criminal record, etc.) then the court would award custody to the family petitioner. If the family petitioner is not found fit to be her parent, then the court would place her in the State's custody and put her in foster care until a suitable adoptive home could be found.
When my niece died earlier this year, her son had to petition the courts to become the guardian of his younger siblings. Someone has to be the official guardian/adoptive parent to be responsible for a minor's care, be able to make medical, educational decisions, etc., and step into the parent's shoes. Minors can't just drift into amorphous "family," with no one person legally responsible.
I'd imagine this is the way it works most places.