Spying was an extremely dangerous game. If Western spies were caught by the USSR or the GDR, they disappeared without trace and were usually never seen again. If Soviet spies were captured in the West, Britain and the USA tried to 'turn' them to secretly work for them.
Some spies became traitors and defected to the other side. This happened in both the East and West.
One famous ring of British spies were the Cambridge spies, five men originally educated at Cambridge University who held high positions in the British Secret Service, in MI5, MI6 or the Foreign Office. They were really working for the Russians, and passed secrets via documents to the enemy.
Guy Burgess, Donald Maclean and Kim Philby were the most notorious British traitors who defected to Moscow and lived the rest of their lives there. It is not known why they betrayed Britain, but it was probably because they believed in Communism rather than Capitalism. Some Soviet spies also secretly worked for the West, as in the case of Penkovsky who passed secrets to the Americans during the Cuban Missile Crisis.