Yes, there are tools for this, and this is something moderators put a lot of effort into investigating. We can pick up when particular users are coordinating questions, answers, and votes between coworkers, friends, or falsified accounts. I obviously won't detail those tools, but they work very well.
The system will invalidate strings of serial votes between accounts, but it doesn't catch everything and is designed to be conservative about vote invalidation. It also doesn't remove accounts, provide suspensions, or take more serious action beyond the vote invalidation. A human always has to make the judgment call on whether more action is needed or to deal with cases where someone has worked around the system.
We find many of these cases ourselves, due to early warning systems we have or just the intuition we've built up after seeing people pull the same schemes year over year. Everyone thinks they are the first ones to try this, but the patterns are easy to see. Others are brought to our attention by the community.
If you see what looks like clear coordination between a few users, or a new user asking poor questions yet getting crazy upvotes on each one, you can flag one of their posts with a custom flag and describe what made you suspicious. A single post getting a couple of extra votes probably isn't enough for us to act on. If you see one person only ever answering questions by another person (and immediately getting those answers accepted) or someone writing terrible posts that always seem to get 2+ upvotes, that might be worth checking into.
Unfortunately, most of this behavior does tend to come from a particular area of the world. We even have evidence that how to defraud the Stack Overflow voting system is being taught to new employees at specific companies. In the end, it doesn't help them, as we will wipe the votes, delete meat puppet or sock puppet accounts, and suspend the accounts involved. They will end up no better than they started, and in fact may get their entire company blocked from posting anything.
It's important to me that people be able to trust the voting system here, so this is something we do spend a lot of time on. Moderators have worked with Stack Exchange to make these tools more effective at catching problematic users before the community notices, but any site this size is going to have some people who slip through.