The cursor shape used to look like ‘I’ but now it looks like a solid rectangle. When I type a letter, it is not inserted but overwrites an existing character. What happened?

Overwrite” mode is turned on. Press the Insert key on your keyboard to toggle “Overwrite” mode.