Espionage or spying involves a government or individual obtaining information that is considered secret or confidential without the permission of the holder of the information. Espionage is inherently clandestine, as it is taken for granted that it is unwelcome and, in many cases, illegal and punishable by law. It is a subset of intelligence gathering, which otherwise may be conducted from public sources and using perfectly legal and ethical means. Espionage is usually part of an institutional effort by a government or corporation, and the term is most readily associated with state spying on potential or actual enemies primarily for military purposes. Spying involving corporations is known as industrial espionage. One of the most effective ways to gather data and information about an enemy (or potential enemy) is by infiltrating the enemy's ranks. This is the job of the spy (espionage agent). Spies can bring back all sorts of information concerning the size and strength of an enemy army. They can also find dissidents within the enemy's forces and influence them to defect. In times of crisis, spies can also be used to steal technology and to sabotage the enemy in various ways.
Contributions by Ww, ArnoldReinhold, and SimonP.