Counter-vandalism
Most edits to Wikipedia are improvements, but some edits are not. Since articles are constantly being changed, Wikipedia relies on editors to look over edits and decide whether the edit should stay or not. Users can have a set of articles they want to follow closely (known as their Watchlist), and they may also go over the list of all recent changes to the project to try to catch unhelpful edits.
How do I look over recent changes?
Go to Special:RecentChanges to see all recent changes. You can set specific filters to only see edits that are very likely bad edits, or only edits by new editors.
Examining the edits
editClick on "diff" to see the difference between the previous and the new version of the article. If the edit is clearly not an improvement, you can click on "undo" to revert to the previous version, don't forget to add an edit summary explaining why you're undoing the edit.
Warning the user
editNow click on "View history" to see who made the edit. Click on "(talk)" to go to the user's talk page. You can then click on "New section" to write a message to them, explaining why their edit was reverted. Several warning templates exist that include common warnings. You can click on "User contributions" shown in the left sidebar when viewing the user's page to check if their other edits also need to be undone.
What to do if a user continues vandalizing?
If a user continues to vandalize or spam despite being given multiple warnings (a minimum of three warnings in the past day is a good criterion), you can report them to administrators who will decide if the user should be blocked at Wikipedia:Administrator intervention against vandalism (or WP:AIV for short). It can be good to include links to some diffs of the user's edits.
Tools
A few tools exist that can make anti-vandalism work easier. When your account is 4 days old and has at least 10 edit, you can install a tool called Twinkle that makes it easier to revert multiple consecutive edits, to give warnings to users, and to report them to administrators.