Spy is relatively easy, but you gotta know peoples habits, the lay-out of the map. And it's a good deal of ambush and lie-in-wait, hence the map-knowing. And some maps just aren't that great for spy. Payloads are generally good, and attack/defence ones, even Control Point. As long as the map A) has a fairly linear goal, so that most people are headed in the same direction and you don't have many people looking behind them, and B) has a fair number of back-alleys you can use to get behind enemy lines, those ones tend to be better spy-playing maps.
Though I have had good times where I just basically saw people I wanted to kill and did it. So it's a bit of a toss-up.
Anyway, even if you get good at the "anticipate where people will come through and what they will do" thing, it's still a toss-up whether you'll be any good in any given round. You can be either at the top of the score-board, or the bottom, there's no real middle-ground. (This might be related to how backstabs give you double points, one for the kill and one for the backstab. So if you get a kill, it counts as most other classes 2 kills. So you could have a mediocre kill-rate in a match but still be leading by like 20 points (assuming you aren't doing anything else, like capping the intelligence or sapping engineer buildings, which tbh you should be doing))
The wiki has some good basic tips for each of the classes, at any rate. General tips, specific strategies, and map-specific class tips.