The threat of malware is a real everyday concern, but the same sorts of programs that hackers can use to steal your personal information (for reasons of identity or monetary theft) can be used to trap a cheater. A keylogger can be installed on your computer to record all the typing you do so that someone else can check up on your online doings. They can either be of the software variety, or hardware devices that plug in via USB or another connection port. Some hardware keyloggers can even transmit the logged data via WiFi.
Various snooping apps can also be installed on your smartphone to track your activity or whereabouts. Such apps could have legitimate purposes like locating a stolen phone, or tracking your own children for reasons of safety or peace of mind. Of course, such methods can be used for less than angelic purposes, like stalking, spying or even marketing from third parties. Currently, someone with access to your phone can install apps specifically created to read your messages, track your movements and even activate your phone's microphone to allow them to listen to whatever you are doing.
As of December 2012, at least one bill was in the works in the U.S. to ban the creation of stalking apps and make it illegal for a cell company to share location information without user permission. A significant other installing such software on your phone may or may not be legal, depending upon who owns the phone and where the parties live. There is a lot of gray area when it comes to digitally spying on your spouse, both because of joint ownership and because laws usually lag behind advances in technology. But currently these software applications and hardware devices are easily obtainable.