Dark Reading has an interesting article about how Target was compliant with PCI(Payment Card Industry) standards and it was not enough.
The Point of Sale terminals were infected with malware specific to Point Of Sale terminals, stole the CC# and the 3 digit CV code as well. So it was designed to steal the complete magnetic strip information.
Many parties may be to blame in this, but what can you do in the meantime?
Test your systems – check for malware, in an automated manner. If there are unknown pieces of software or ports open on your computers then that means it requires more investigations and cleaning the systems.