Original: Lee Harvey Oswald was charged with the crime but was shot and killed two days later by Jack Ruby before any trial.
Simplified: His killer, Lee Harvey Oswald was arrested but was shot dead by Jack Ruby two days later, before there was a trial.