Just about everything -- except Windows, of course -- uses some subset of ANSI escape codes. Many support POSIX.1-2001 termios interface for the terminal settings. In Linux, you'll probably also use at least one tty ioctl (TIOCGWINSZ, to get the new terminal size when a SIGWINCH signal is caught).

The kernel side support in Linux at least is very lightweight. Almost all the work is really done in your terminal application (or console driver, if you are using e.g. a framebuffer console). If you look at the ANSI escape codes, they're not difficult to support at all. Same for DOS; the libraries just manipulate the display buffer that consists of alternating character and attribute bytes, or rely on ANSI escape codes too, via ANSI.SYS. I suspect even Windows does not do anything overly complicated.

Overall, the curses interface seems a pretty good abstraction for this, in my opinion. It should not really be a surprise, considering it is decades old already, but still actively developed. ncurses, for example, started as pcurses in 1983 or so. First ncurses (version 1.8.1) was released in 1993.