Broadly speaking, an error is a mistake. It is the state of being wrong. In psychology the word error is used in a few different ways.
In research you can have a type I error (false positive), type II errors, sampling errors, and errors of central tendency.
In learning and problem solving trial and error is a method by which something is attempted multiple times until a correct solution is reached.
In social psychology the Fundamental Attribution Error is a well-known cognitive bias in which we attribute the behaviors of others to internal, dispositional characteristics rather than situational or environmental explanations.
For example, if someone cuts you off in traffic the Fundamental Attribution Error would cause you to think that person was a huge jerk instead of thinking about possible situational reasons why they cut you off (loved one in hospital, having a baby, etc).