Different sites have different rules, but on any site that allows the same item to be edited by multiple users, there has to be some rule to avoid rollback wars, since these could otherwise last forever. The rule typically involves ownership (e.g. the owner of an item gets the final say), a hierarchy (a moderator steps in and decides which version to retain), or some more complex conflict resolution process.
Stack Exchange has no formal rule regarding rollbacks, but two rollbacks from the same user generate a moderator flag. If you find yourself disagreeing with a rollback, the best course of action depends on how egregious the edit you disagree with is.
- If it's your post, then generally speaking, you get the final say unless you are violating community norms. For example, if you want to include incorrect information in an answer, it's your prerogative. On the other hand, correct tagging of a question is a matter for the community.
- Conversely, if you aren't the author, you should let go. If you think there is an objective reason that your version is better, you should explain it in a comment, and raise a custom moderator flag to explain as well.
- As a user, I never roll back a rollback unless there is a strongly compelling reason, such as insulting content or exposed private information. In such cases, I always flag for moderator attention, explaining the situation.
On Stack Exchange, moderators can combat edit wars by first warning off the participants, and if that fails, either locking the post or suspending the participants' account. The moderator also gets to choose which version to retain — or to delete the post if the potential for conflict outweighs the usefulness of the post.
Wikipedia has rollback feature, which allows a quick rollback of the latest edits, is only available to selected users, and is mainly intended for vandalism cases. In addition, reverting allows any editor to select an old revision. The guidance for reverting is to “leave a note on the Talk page first and then revert”. There is a firm rule of conduct, the three-revert rule: an editor may not revert the same page more than three times in a day except for egregious cases like clearly illegal content (editors are nonetheless encouraged to stop before that point); violation of this rule normally leads to a block. If an edit war flares up, the conflict resolution procedure is to use the talk page to try and settle the dispute.
Generally speaking, by the time you get to your second rollback, it's high time to engage in whatever dispute resolution process your platform provides. Whether to actually perform that second rollback depends on how egregious the offending content is and on your community norms.