The git reset
method described by janos works fine, but completely obliterating a commit is rarely necessary and if you make it a habit it's easy to end up in a situation you can't handle.
Unless the reason to nuke the commit is because you accidentally committed a huge file or because there are legal restrictions, I'd suggest reverting the commit. This preserves the commit but deletes all its changes. In other words, the commit will still be in the history of the project (along with the commit that reverts it), but its changes will be gone.
git revert HEAD # revert the currently checked out commit
git revert 123456abc # revert the commit with id 123456abc
git revert master~ # revert the parent commit of the master branch
git reset --hard
and other methods of rewriting the history of a branch are powerful and useful tools, but it's a good idea to learn its limitations and consequences.