The C Standard Library (see https://en.wikipedia.org/wiki/C_standard_library ) has a set of input and output routines that are used to read from and write to various input and output resources. The C Standard Library is ordinarily built upon the system services and system calls provided by the target operating system though in the case of embedded microcontrollers that do not have an operating system a different approach is used.
In addition to the C Standard Library there are other libraries often used such as the POSIX library (see https://en.wikipedia.org/wiki/C_POSIX_library ).
I use the term resources because the target for an input request or an output request may be a large variety of different things.
The model adopted by the C Standard Library is similar to that of the Unix operating system in that all of the various kinds of resources are treated as a device from which you read a stream of characters or bytes and you write a stream of characters or bytes.
In some cases this is abstraction allows you to ignore the details of physical connectivity of the resource. So you can open a file on a SATA hard disk, or a USB thumb drive, or a network server. You can print to a printer whether the printer is on a serial communications port, or a USB port, or a network printer.
For some types of resources such as a console device or a printer which has rows and columns and a cursor that can be moved, you would ordinarily provide the cursor positioning information within the characters you write to the device. So you would output both the text you want to print on the console as well as escape codes that would position the cursor where you want to write or some other action such as highlighting text.
One such console device was the VT100 terminal from DEC (see https://en.wikipedia.org/wiki/VT100 ) which used special escape codes in the output to do things like position the cursor on the screen. This was so handy that console windows on Unix, Linux, and Windows use similar escape codes to do similar actions on console or command windows (see How to make win32 console recognize ANSI/VT100 escape sequences?).
The C Standard Library provides a standard interface to a wide variety of devices and it is up to the people who wrote the library to provide the underlying functionality that the library needs to actually do reading and writing.
However the Standard Library does have the limitation of streams of characters as part of the model that it uses or presents to the programmer. That is why there are other libraries that are not part of the C Standard Library for graphical user interfaces and games such as from Microsoft, Qt, and various other groups such as OpenGL (see https://en.wikipedia.org/wiki/OpenGL , https://en.wikipedia.org/wiki/DirectX , https://en.wikipedia.org/wiki/Graphical_user_interface , and What is Linux’s native GUI API? ). See as well How are GUI's really made? and How does an operating system draw windows on the screen?
If you want to bypass the C Standard Library and use the operating system I/O system calls or services directly, you can do so. However unlike the C Standard Library which is standard across compilers that meet the C Standard requirements, the operating system I/O services will vary from operating system to operating system. And some operating systems may have several ways to do the same kind of I/O. For instance Windows has a number of different ways to perform file I/O (see https://en.wikipedia.org/wiki/Windows_API ).
In some cases you can bypass the operating system and talk directly to the device or resource. This is often done with embedded applications and in many cases with embedded applications on some microcontrollers, there is no real operating system available and you must interact directly with the device.
Embedded applications on microcontrollers often use specific memory addresses to interact with sensors in order to prepare the sensor for sensing as well as to read data such as temperature from the sensor. Sensors have a number of different connectivity methods which requires the programmer to know something about the electrical setup and the protocol to be used to talk with the sensor such as I2C (see https://en.wikipedia.org/wiki/I²C ), 1-wire (see https://en.wikipedia.org/wiki/1-Wire ) and others.
Under the old MSDOS operating system you could call BIOS routines to directly interact with devices including the screen. Or if you knew the address of the screen buffers and the proper format for the memory area, you could modify what was displayed on the screen by writing directly into memory areas where the screen frame buffers were located.
Modern multi-threading and multi-processing operating systems have sophisticated functionality within their system calls to handle the kinds of synchronization and coordination problems that can arise with multiple applications all trying to use the same devices and resources. Since the C Standard Library is built on top of these operating system services, when you use the C Standard Library you get that sophisticated functionality such as file locking. And using operating system services through the Standard Library you get the expertise and knowledge of experts who have done the work that you can just use.
Modern operating systems provide a rich variety of services such as file I/O, network I/O, printing services, etc. The C Standard Library along with other libraries from other groups such as POSIX provide a standard, portable way to access those services.
And when the C Standard Library and the POSIX library are ported to microcontrollers, you have a way of accessing this same functionality without having the huge learning curve of having to write your own library.