'Error' can be seen as a fault within a system, as in a computer error.
So, in language learning, we sometimes make the distinction between an 'error', which is made when the learner doesn't know or has misunderstood or misapplied a rule, and a 'mistake', which is a simple momentary 'slip'.
The word 'error' is relatively unusual in everyday speech. As ever, when we have a choice between near-synonyms in English, the Latin term (in this case 'error') tends to be used for technical. academic and formal situations, whereas the word with the Germanic root (in this case 'mistake') is the more general term in everyday use.