Fossilization refers to the process in which incorrect language becomes a habit and cannot easily be corrected.
Example
Many advanced level learners who have Spanish as an L1 do not distinguish between ‘he' and ‘she'. This could be a fossilized error.
In the classroom
Errors in general take time to correct but a fossilized error may never be corrected unless the learner sees a reason to do so, e.g. if it is seriously hindering communication. Teachers can help learners notice their fossilized errors by for example recording them speaking, or by asking them to keep a record of written errors as part of a language portfolio.
Further links:
https://www.teachingenglish.org.uk/article/analysing-language
That's the wrong example for fossilization. Spanish speakers do have equivalents for 'he' and 'she' in their native language and can thus distinguish between the two pronouns easily. The error you refer to is of a different type. Please see: Antón-Méndez, I. (2010). Gender bender: gender errors in L2 pronoun production. Journal of Psycholinguistic Research, 39(2), 119–139. https://doi.org/10.1007/s10936-009-9129-z