Baseball, by the Rules
Errors
The vast majority of the time, if you give a major league player the chance to make a defensive play, they will make that play. But not 100% of the time. When a play is not made, the result might be called an “error.” An error is a term for when a defensive play should have been made, but wasn’t. There are two possible results of an error, and you might see both of them on the same play: a runner is safe when they would have been out, or at least one runner is able to advance to a base they would not have advanced to otherwise. You might still see a play called an error if neither of those conditions is met, but it's rare.
The crux of an error is a play that "should" have been made. When we say “should have been made,” the idea is that a fielder should have been able to make a play without expending an unusual amount of effort. Additionally, a play will not be scored an error if a defensive player does not touch the ball while that play is made (or not made).
Here are some examples of how these ideas come into play:
Labeling a specific play or misplay as an error is up to the judgement of an official called the scorekeeper, whose job is to keep the records for every play. Each MLB game has a scorekeeper provided by the home team, whose judgments are announced to the press box and the announcer's booths; from there, the information is dissemenated about the ballpark and through the various broadcasts covering the game. Usually, this determination comes rather quickly.
Sometimes, you'll be watching a game, see a play that looks like it should absolutely go as an error, but then you look up and see it scored a hit. Keep a couple of things in mind: first, a scorekeeper's initial call is not necessarily final; a scorekeeper can reverse their own judgement later on in a game, changing a hit to an error, or vice-versa, or even appending an error to a play where none had been called previously (for example, a hit that was initially ruled a triple would be changed to a double and an error that allowed the batter to take third base). Second, fielders who get tagged with errors can also appeal those errors, meaning that an error might get overturned the next day. Another thing to keep in mind? Errors have been trending down for a long time, and that trend has been accelerrating since 2010. Here's an article that, towards the end, discusses this phenomenon and links to an Athletic article that we would have definitely linked ourselves, were we not worried about paywall issues.
Errors are tracked at a team level, and are often displayed as part of a “line score,” which displays the total number of runs scored each half-inning, along with the total number of runs, hits, and errors, along with other pieces of information.