Salaams

what is the shariah ruling when a minor child looses one of his/her parents? who become their legal guardians?