How locale works?

For example, a c statement like prinft("text\n"); printing a string to standard output. Internally it will eventually first read the locale environment variable and then read the corresponding locale file. My question is what is inside LC_CTYPE file? Dose it contain something like, this byte encoded in ASCII corresponding to this code, if you want the representation of this byte to display on the screen, you need to write this code to video card register. Is this kind of how it works?