Who verifies correct answers on Stack Overflow?
Everyone checks answers on SO. You need very minimal participation in the site to be able to vote, and when you do, you're able to provide your feedback on the quality of posts.
Is upvoting and downvoting a feature designed to elevate useful answers on stack overflow? If not, what is this feature for?
Yes. Absolutely. That's exactly what it's for.
I have seen several correct answers downvoted, even though i could verify the answers by copy-pasting the code into an IDE and running it.
And yet, as you mention in your earlier quote, what matters is whether or not the answer is useful. That you can copy-paste some code and run it doesn't mean the answer is useful. It may do what the answer claims, but not what the question asks, it may have major security vulnerabilities, it may have significant negative side effects that aren't immediately apparent, it may work for the example in the question but not for other inputs of the described problem, it may be extremely unclear or poorly explained, it may have been plagiarised from other content, or any number of an infinite other possibilities that would make the answer not useful.
Likewise, incorrect answers can be upvoted, even if you can test them and leave comments with corrections.
Perhaps those voters didn't notice the mistake. By all means, contribute through comments or another answer to draw attention to the problem, and vote on the post yourself to provide your feedback as to the quality of the post.
But perhaps they noticed the problem and felt that the error was minor and felt that the post was useful despite it. For example, if an answer has a simple typo in a variable name somewhere it might not even compile, and I would fix that problem if I saw it, but a voter may well feel that the post is "not useful" just because there's a small typo in it. These are all matters of judgement, which is precisely why voters have such wide freedoms in how they can vote.