What limits are there on how I can vote?
How often can I vote? How do my votes become locked/unlocked?
Post votes (votes on questions and answers; upvotes and downvotes count the same)
The exact number of votes available depends on your voting behavior for the day. You get a total of 40 votes per day, which are broken down into 10 "Q-votes" and 30 "QA-votes" per day.
When you start the day off, the system will deduct from your Q-votes when you vote on a question, and deduct from your QA-votes when you vote on an answer. If you run out of your Q-votes, you can continue voting on questions, but it will deduct from your QA-votes instead. When you have five QA-votes remaining, you'll see a message "You have 5 votes remaining"; at this point you'll be blocked from using your Q-votes and any post you vote on will count against your QA-votes.
This means that if you vote mostly on questions in the beginning, you'll run out of your Q-votes first and will be able to reach 40 votes in a day. However, if you drop down to 5 QA-votes with Q-votes remaining, you'll be blocked from using those Q-votes, and you won't be able to reach 40 votes in a day.
The exact formula used by the system is described in this answer by Shog9. It's different from the above algorithm, but in the end the result will be exactly the same.
If the post is deleted the same day as your post vote was cast, your daily vote allowance is recalculated as if you never cast that vote. In most cases, you'll get an extra vote. Therefore, the number of possible post votes available can exceed the normal thirty to forty if there are deletions.
Upvotes can be cast by users with 15 or more reputation.
Downvotes can be cast by users with 125 or more reputation. (100 on Meta Stack Exchange)
Fifty close/reopen votes per day per user on Stack Overflow, Mathematics, Server Fault, Super User and Ask Ubuntu.
Twenty-four close/reopen votes per day per user on all other sites (source)
Close and reopen votes can be cast by users with 3,000 or more reputation (500 or more on public beta sites) or 250 reputation for your own questions (also 250 on public beta sites)
When you have five or fewer votes remaining for the day, a popup will inform you how many votes you have remaining after each vote you cast
If you reach the limit and try to vote again, a popup will indicate the number of hours you need to wait before voting again
Five delete votes per day per user
One additional delete vote per 1,000 reputation beyond 10k, to a maximum of 30 delete votes
Delete votes can be cast by users with 10k or more reputation (2k on public beta sites).
Users with at least 10k rep (2k on public beta sites) but less than 20k rep (4k on public beta sites) must wait until a question has been closed for 48 hours before voting to delete
Users with at least 20k rep (4k on public beta sites) may vote to delete closed questions immediately after closure provided they have a score of −3 or lower. Additionally, they may vote to delete negatively scored answers.
In general, once you have voted, you cannot change your vote. There are two exceptions.
Exception one: you may change your vote a practically unlimited number of times within a five minutes window from the first vote you cast on that post. Note that after voting and undoing your vote 30 times, it will also be locked in.
Exception two: you may change your vote after every time the post is edited. A new window starts with the first vote you cast after each edit.
To simply undo a vote — i.e. make it as if you had never voted in the first place — click the "lit up" vote button. The result will be that neither an upvote nor a downvote is active, and you can come back to vote any time you like. Only cast votes are locked in.
To reverse a vote — i.e. change an upvote to a downvote or vice versa — click the "unlit" vote button, as you usually would. There is no need to perform an undo first.
Close votes can be retracted on any question which hasn't already been closed or your vote hasn't aged away, but you do not regain the vote to cast again and cannot re-cast another close vote on the same question. In other words, use this only if you don't believe the question should be closed; don't try to use this to change your close vote to a different reason.