To spy is to secretly watch someone. It’s not recommended unless you’re actually a spy, a person who is hired by a government or organization to keep tabs on enemies.
You might imagine a spy working for the CIA or the KGB, but there are also military spies who infiltrate their opponents' armies to get information, commit sabotage, or steal technology. Private businesses sometimes employ spies as well, to collect information about competitors. As a verb, to spy is to do what a spy does—or simply to see something: "I spy brownies on the kitchen counter!"