I'm not at home with my reference info currently, but I think you have to have the optional Espionage tech before you can use them (and therefore Communism as well). Then when you click the little 'E' on the frame of the status window at bottom right to open the menu of embassy actions you see extra spy options.
You can use the 'E' button to investigate cities and steal techs without espionage while you are at peace. Spies give you the extra ability to look at the AI troop deployments and spaceship progress, commit sabotage and spread propaganda, and to investigate and steal from a civ you are at war with. They can also be used to get another AI civ to declare war because that's likely to happen if you are caught, but I think there are cheaper ways to do that.
I never use them, and rarely even bother to trade for the requred techs. Spying missions seem to me very expensive, and risky, in themselves, and when you add the cost of the two optional techs to get to use them I think their value is dubious.