Both murder and manslaughter are forms of homicide, or the killing of one person by another. However, when establishing murder or manslaughter where there is a homicide, the difference is made when it comes to one word: Intent.
If a person plans and carries out a plan to inflict pain and death upon someone else, and a causation is establish (a rationale/a motif), then that person would be accused of murder. Murder comes in first or second degree. Those who have a clear intent are murders in the first degree.
Manslaughter occurs when there is a homicide which was accidentally or unwillingly caused by someone. For example, crashing an out-of-control vehicle against another and causing the death of the other driver is something that a person may not have been able to control. However, death was still caused and the killing is still ruled as a homicide: But not as "murder".
Manslaughter can also come at different degrees and there is a lot of discussion on whether voluntary manslaughter can be also deemed as plain murder, whereas involuntary manslaughter can certainly be ruled as an accident. However, that is something for lawyers to negotiate with the state, who conducts the investigations.
Mainly, intent is the causative of the difference between the two.