Crime and murder are fascinating subjects for the writer. And thankfully for crime writers, pretty absorbing to the rest of the human race. It is a part of human nature to what to know: why, who, when, where, and how. For some the puzzle's the thing. So whodunits abound.
More rarely it's why, what motivates the killer? So we have stories like Patricia Highsmith's "Ripley" where we know who, right from the start.
Often it's the methods the police use, so Police Procedurals are liberally scattered for the public's perusal.
There are a few different "types" of crime story, with labels such as the afore mentioned "Police Procedurals" and the "Whodunits" but even these can be further categorised into: Cozy, Hardboiled, Crime-capers, Suspense, Noir, Alternative... and lots more.