You have a short period of time to change your mind on a vote, five minutes. After that, you can only change your vote if the question or answer has been edited.
This helps to prevent irregularities in voting. If I could go back and take away every up vote I ever made, more than a few people would see a 1k + drop in reputation. If you thought the post was good, or not good for the duration of the grace period, the system assumes you knew what you were doing when voting either way.
The grace period allows for:
- Accidentally clicking one when you meant the other
- Realizing that you just misunderstood something that someone was trying to say
- Seeing a better answer get posted that you think should rise to the top
Again, when you vote, you vote for a post exactly as it is when you voted. If it changes, you are able to change your vote accordingly if you wish.
This is indeed in order to help curb the tactical down-vote problem.