You may have turned on a feature in Accessibility to create this mystery.
A Macworld reader asked us why red outlines were showing up around selected areas in their browser. The “red squares” problem readers had previously reported didn’t apply here. (Those red squares probably stem from a failing graphics processor.) When in doubt about elements appearing in macOS that you don’t expect, consult the Accessibility preference pane.