One of the beautiful things about the Arduino platform is that the user gets to decide if s/he wants to keep digging down lower and lower in details and complexity or rather stay at a higher level and just build stuff that works.
It's said the original user target for the Arduino team was artist and other creative but possibly non-technical people, such that they might be able to utilize microcontroller technology without necessarily having to go via the normal time consuming learning curve of more traditional computer programmers/developers. However under the hood are all the traditional parts and tools of a true computing system. And while limited in speed and power compared to say PC computers, the underlining computing principles all apply.
At the lowest level there is a microprocessor chip (actually several different models can be used) made by the Atmel Co. It is a small 8 bit computer that has all the basic elements that a traditional computer has. Being a micro-controller rather then just a microprocessor it also has many built in specialty digital and analog hardware features not necessarily found in traditional 'computers', as well as built in memories of several types, flash, sram, eeprom. The programming instructions used by this chip are called it's instruction set and is unique to the Atmel AVR 8 bit chips. A user could if they want, program the chip at this level using AVR assembly language. The Arduino IDE platform does not directly support this level of programming by the user but it does get accomplished under the automated verify/upload operation. And by using other open source software tools users can write and develop programs at this level is they so desire. The Atmel datasheets for the specific chip (mega8,168,328,1280,2560,etc) is an essential document for starting to learn this assembly level of programming/development.
In the next high level step up in the Arduino system is the C/C++ compiler/linker that takes industry standard C/C++ statements from the users 'sketch' and outputs the AVR instructions that can then be uploaded to the chip for execution. The upload process is handled by an open source program called AVRDUDE that is included in the Arduino platform. The Arduino people didn't develop the compiler, but rather just integrated into their platform the open source AVR g++ compiler tool chain project.
Next level up is the built in functions that the Arduino platform has available for the user to use in their 'sketches'. These can be simple functions or more complex libraries that save the user from having to develop from scratch very common and/or useful functions. A user can also develop their own functions and libraries if they wish, to be included in future programs they may develop. 'Wiring' is one of the higher level libraries that the Arduino platform includes that simplifies a lot of the special I/O features of the AVR chip. Wiring is itself from a different open source project that the Arduino team integrated into their platform. The Arduino team also developed a lot of additional functions and libraries that are available to the user and new features get added with every new IDE release, which is currently at version 21!
Lastly there is the actual Arduino IDE software that the user interfaces with and runs on a PC. This IDE itself is developed from yet another open source project called Processing. This is where the user writes their sketch (program) and yes the user writes it in real legal C/C++ statements, and has the advantage of a lot of pre written libraries and functions that make writing programs for the AVR microcontroller quicker and easier then having to master super low level details of the controller.
So it should be very apparent that one unique part of the Arduino system is that it is built on top of several prior independent open source software projects. That and the fact that their hardware design is also open sourced and can run on all three major PC operating systems makes the Arduino pretty unique and probably the first to hit on all those major points.
That my not answer your questions about what happens ' behind the scenes', it does I think add value to point out the various levels and functions that the Arduino platform spans. From there maybe more specific questions can arise in clearer context.
Lefty