If you want to discard your current set of changes and revert to the
working revision from which you started editing the file, use C-x
v u (vc-revert-buffer). If the version control system is
locking-based, this leaves the file unlocked, and you must lock it
again before making new changes. C-x v u requires confirmation,
unless it sees that you haven't made any changes with respect to the
master copy of the working revision.
C-x v u is also the command to unlock a file if you lock it and then decide not to change it.
To cancel a change that you already committed, use C-x v c
(vc-rollback). This command discards all record of the most
recent checked-in revision, but only if your work file corresponds to
that revision—you cannot use C-x v c to cancel a revision that
is not the latest on its branch. Note that many version control
systems do not support rollback at all; this command is something of a
historical relic.