A function must return a value. In programming, that value must have a type. C++ has several types:
int - an integer type, numeric without a decimal point or fractions.
float - a real number type,
double - a float with twice the precision
char - a single character
bool - a logical type, true or false
void - a "type" meaning nothing
The main function will almost always return either an int or void type.
If the main program returns an int, it is a message to the operating system indicating success or failure. Usually zero means the program was successful. Any non-zero value means a warning or error of some sort. The programmer alone defines these values.
If the main program has a void return type, then there is no such message.
Some operating systems require the int; others will accept either a void or int.