Worringly simples and all but impossible to detect.
Even using a high level language like VB it's pretty simple to hook into the keyboard and see every keystroke typed in every application.
Getting the application being used is trivial as well. So all we have to do is either capture everything and send it somewhere via email or http (also easy) or just wait until we see a sequence of numbers that look like a credit card.
It took me about a day to research this and have something working in a half arsed sort of way.
Good job I'm so honest...