Basically you hold your mouse over a unit you want to kill, then hold either Alt+W, and your right sidebar will display how each unit there compares to the mouseover'd unit. That will be a cap-vs-cap comparison, use Alt+E for a single-ship-vs-single-ship comparison.
Mainly it's helpful when you've got something tough to kill and you want to know what to use that you have already on-hand. As opposed to what can theoretically kill it, which you can get from the reference tab (or by using the Alt+W thing plus F1 to switch the right sidebar through displaying other ship types).