Can someone point me where can I learn more about communicating with POS/Cash register printers?

I am trying to understanding more about it, I know that I need to use QSerialPort for communicating with them, but I seen on the internet that hexadecimal codes are sent to them, so I want to learn more about what info is sent to the printers.