That depends on the circumstances.
If the deceased left a valid last will and testament, the court will usually appoint the estate executor or personal representative named in the will.
If the deceased left no valid will, the court will appoint the personal representative in its own discretion (generally from among close relatives, such as the victim’s spouse).