CSI ? 25 h makes the text cursor visible; CSI ? 25 l hides it. Standardized as DECTCEM (DEC Text Cursor Enable Mode). TUIs hide the cursor while redrawing the screen to avoid a flickering caret, then show it again on exit.
CSI ? 25 h makes the text cursor visible (the default state).
reset
Hide cursor (DECRST)
\x1b[?25l
CSI ? 25 l hides the text cursor. Used by TUIs during screen redraws to prevent caret flicker.
gotchas
ALWAYS restore the cursor (\x1b[?25h) on exit and on signal handlers; a program that hides the cursor and crashes leaves the user with an invisible caret until they run 'reset' or 'tput cnorm'.
terminfo names these civis (hide, vi) and cnorm (normal/show, ve); ncurses uses them. There is also cvvis (very visible) which is a different capability.
Hiding the cursor does not move or change it — show restores it at whatever position it was last placed. Cursor SHAPE/blink is a separate control (DECSCUSR, CSI Ps SP q), not mode 25.
This mode is widely supported even on minimal terminals; it is one of the safest DEC private modes to rely on.