1) They are hired by a family that is unhappy with the police investigation - this is rare, but it happens
2) They are hired by a criminal defense attorney who represents a defendant accused of murder - this is more common, where the investigator is trying to assist in the defense of the accused by finding evidence that is contrary to the prosecution's case.
Scenario 1, yes, the investigator might well "solve" the case, but whatever evidence/witnesses he or she has uncovered to solve the case will be turned over to law enforcement so that they can bring the case into the court system. The private investigator then becomes a witness.
I hope this helps
Working for a criminal defense attorney (if a suspect had been arrested), your investigation could lead to a different suspect. That information would be turned over to the police or the district attorney, who likely would "take the credit" for solving the case.
If no suspect had been arrested, it is possible the family would retain you to conduct an investigation if they were not satisfied with actions taken by the police. Again, in order for there to be an arrest, the information would need to be turned over to the police. A private investigator often works in the background, and does not always get recognition for his/her work.