In that specific case, as far as I understand, the initial compromise was traced back to a compromised system at cPanel. The breach allowed the indirect attack of some systems which use cPanel, and the attacker was on the habit of installing a rootkit which put a backdoor in SSH.
The general methodology for understanding what happened and whodunnit is the same as in any case of post mortem debug: gather data & think hard. If many machines were compromised, try to work out what they have in common. Inspect all log files. Take a byte-to-byte image of the hard disk of an affected machine and see if there are interesting things in deleted files (most attackers will cover their tracks by deleting temporary files they used, but few will bother to actually fill the corresponding disk areas with zeros). This is called forensics and it is an expertise in its own right.