OK i will try and answer this for you

In the game screen press F4. This opens the economy manager for your empire! At the bottom of the left tab is a slider for espionnage. Ensure this is showing at least '1' on its scale. This will allow you to create spies.
Spies can be used in a couple of ways-
1. To gather info on a paticular planet you are interested in and if you have enough placed your knowledge of the entire empire will increase.
2. To stop a certain part of your opponents infrastructure from working by placing the spy on that tile, thus rendering it useless.
3. To commit brigandage on your opponents planet by placing enough spies to cover all of his improvements a couple of turns before you invade the planet. This will cause major issues for the AI if you inhibit the farms built as the population starves overnight

To place spies you need to have 'seen' the planet you wish to infiltrate and if this is done you then click on the icon on the far left of the game screen (shows red when you have available agents). This changes your cursor into the spy placement one and you need then to click on the chosen planet. This will open up a new window showing the infrastructure of the chosen planet. Left clicking on any structure other than the civ capital or spaceport will place your agent on that tile rendering it useless.
That is the fundemental structure of spies. The F4 menu has a tab where you can see in more depth how long it will take to create a spy if you wish to keep a closer check.
If you receive a message saying you have been infiltrated by foreign spies you should check your planets for the red spy icons and then following the above place one of yours directly on the enemy agent killing him instantly

There is also a technology that once researched and built on a planet will inhibit spying on that planet and in later games this can be a helpful building to have on a tech, research or economy capital.
Hopefully i havent missed anything but dont be afraid of asking more if you need to.
D
The Galactic Core Forums - Home of the Metaverse Council