Most often, hackers move laterally, undetected through networks, compromising asset management servers and using them to plant malware on POS terminals.
Article Link: http://www.eweek.com/security/cybersecurity-firm-attivo-warns-new-pos-hacks-coming.html