Data breaches at retailers aren't going away but there are ways consumers can protect themselves from future heists of their payment card information.

Home Depot said Thursday that malicious software lurking in its check-out terminals between April and September affected 56 million debit and credit cards that customers swiped at its stores. Target, Michaels and Neiman Marcus have also been attacked by hackers in the past year.