flashing cursor overwriting text

How do I stop the flashing cursor from erasing the next character when correcting words.

Short answer: press Ins key.

Slightly less short answer: you changed the input method to “overtype.” That happens when you either press the Ins key or click, in the status bar, just to the right of the name of the text language.