This isn't a bug.
To vote (up or down), click the appropriate arrow. The arrow will be highlighted.
To cancel a vote, click the same arrow again. No arrow will be highlighted.
If you previously voted one way and then click the other arrow, it both cancels your previous vote and applies the new one at the same time, ie it swings from + to - or vice-versa.
After about 5 minutes (it may be exactly 5 minutes, I don't recall), your vote will be locked in and you can't undo it or change it. It sometimes happens that when there are multiple answers posted, one of the posters could downvote all the other answers to make their own look good and then later go back and undo those votes. By locking in the vote, it would cost someone some reputation to do that type of voting.
In addition to the help pages for this site, you can find some useful information on the main meta site for all StackExchange sites. There are a lot of details of how things work on all SE sites in the Community FAQ on meta.SE. I would recommend that you don't try to read the whole FAQ at once, but it does have a lot more information than the help pages, so if you have a question, you could try to find an FAQ that might cover what you're asking about.