How Arduino IDE works?
You can turn on verbose compiling.
This will show all the compiler commands used by Arduino IDE.  

The ino file is converted to a .cpp file (which you can see in the verbose output). Basically the conversion is as follows:


merge all .ino files into one big .ino file with the [project].ino
file first 
Add arduino.h
Add all function declarations of methods defined in the .ino files
Save as .cpp file


As to the lack of main method.
The core contains a main.cpp file which defines main in avr world this looks like

int main(void)
{
    init();

    initVariant();

#if defined(USBCON)
    USBDevice.attach();
#endif

    setup();

    for (;;) {
        loop();
        if (serialEventRun) serialEventRun();
    }

    return 0;
}