特 (special) + 工 (work/worker) = a special worker, i.e. someone doing secret/special work for the government.
usage
特工 is the most common word for 'spy/agent' in modern Chinese media. Compare: 间谍 (jiàndié) emphasizes spying/espionage, while 特工 emphasizes the special-operations role.