Espionage (a word from [[Latin language|Latin espionnage) or spying is a practice of obtaining information about an organization or a society that is considered secret or confidential without the permission of the holder of the information. Unlike other forms of intelligence work, espionage involves accessing the place where the desired information is stored, or accessing the people who know the information and will divulge it through some kind of subterfuge.It also can be used as a general term to describe spying activities.
Espionage is usually part of an institutional effort (i.e., governmental or corporate espionage), and the term is most readily associated with state spying on potential or actual enemies, primarily for military purposes, but this has been extended to spying involving corporations, known specifically as industrial espionage. Many nations routinely spy on both their enemies and allies, although they maintain a policy of not making comment on this. In addition to utilizing agencies within a government many also employ private companies to collect information on their behalf such as SCG International Risk and others. Black's Law Dictionary (1990) defines espionage as: "...gathering, transmitting, or losing...information related to the national defense."
A spy is a person employed to obtain such secrets. The term intelligence officer is also used to describe a member of the armed forces, police, or civilian intelligence agency who specialises in the gathering, fusion, and analysis of information and intelligence in order to provide advice to their government or another organisation. In general, intelligence officers travel to foreign countries to recruit and "run" intelligence agents, who in turn spy on their own governments. These agents can be moles (who are recruited before they get access to secrets) or defectors (who are recruited after they get access to secrets).
Incidents of espionage are well documented throughout history. The ancient writings of Chinese and Indian military strategists such as Sun-Tzu and Chanakya contain information on deception and subversion. Chanakya's student Chandragupta Maurya, founder of the Maurya Empire, made use of assassinations, spies and secret agents, which are described in Chanakya's Arthasastra. The ancient Egyptians had a thoroughly developed system for the acquisition of intelligence, and the Hebrews used spies as well, as in the story of Rahab. Feudal Japan often used ninja to gather intelligence. More recently, spies played a significant part in Elizabethan England (see Francis Walsingham). Many modern espionage methods were well established even then. 
The Cold War involved intense espionage activity between the United States of America and its allies and the Soviet Union and the People's Republic of China and their allies, particularly related to nuclear weapons secrets. Recently, espionage agencies have targeted the illegal drug trade and those considered to be terrorists.
For three decades the United States has cultivated its best and brightest to pre-eminence in what is now known as the field of communication and control. As technology has advanced, the means and methods of espionage have advanced from Nixon era wire tapping, through Reagan era programs like ECHELON and Carnivore, to surveillance of all electronic transmissions including cell phone logs, voice mail, email, packet sniffing, trace routing and wireless transmissions.
However, the Soviet Union has been said to have had fielded the largest and most advanced spy networks during its time, infiltrating some of the most secure places on the planet, which has caused many scandals.
Since January of 2000, a long list of agencies have been data mining the world's stock exchanges; this program was formalized on October 26, 2001, in the form of the Patriot Act. This helps track the financing of people who might be laundering money. This is done without warrants.
In order to gather political and economic information that might be of advantage to the United States, foreign communications are routinely subject to surveillance. In 2002, new programs of satellite surveillance and unmanned low level drones armed with missiles made it possible not only to perform surveillance in real time, but to respond with force.
The risks of espionage vary. A spy breaking the host country's laws may be deported, imprisoned, or even executed. A spy breaking his/her own country's laws can be imprisoned for espionage or/and treason, or even executed, as the Rosenbergs were. For example, when Aldrich Ames handed a stack of dossiers of CIA agents in the Eastern Bloc to his KGB-officer "handler," the KGB "rolled up" several networks, and at least ten people were secretly shot. When Ames was arrested by the FBI, he faced life in prison; his contact, who had diplomatic immunity, was declared persona non grata and taken to the airport. Ames's wife was threatened with life imprisonment if her husband did not cooperate; he did, and she was given a five-year sentence. Hugh Francis Redmond, a CIA officer in China, spent nineteen years in a Chinese prison for espionage—and died there—as he was operating without diplomatic cover and immunity.