The value returned from main is passed to the operating system where it is stored as an error value. Nothing is actually done with it unless you specifically write code to handle it.
Not every value returned is even an error. The value returned means whatever the programmer wants it to mean. It could represent the number of lines in a file, the number of files in a folder, or it could mean the phase of the moon. You need to read the documentation that comes with the program.