Not all spyware do that. I think you're referring to keyloggers. Spyware infect your registry keys, display annoying ads, and "hijack" or change your IE homepage. Keyloggers remain silent in the computer background, tracking passwords, credit card #s, and usernames. Now in the creator's side, he/she gets the information about the passwords, credit card #s, in a program. It is displayed in plain text (most of the time). Keylogger do not just infect users "randomly"... it may infect users just by visiting a website (drive-by-download) or it may be bundled with a program. Usually, a anti-malware/spyware program will remove a majority of keyloggers that it finds on the users computer. The program identifies the keylogger by "fingerprints" or by heuristic analysis. But also note that there are variants of keyloggers and spyware.