1. What you clone from the mangos repository is the server. When you compile it it takes the source code and creates the executables (EXEs) and libraries (DLLs) that you run.
2. It interacts with the database using the MySQL library (a DLL located in the same folder as mangosd.exe, realmd.exe, etc) through networking. Basically, the mangos process connects to the MySQL server (running as a process on the same computer or a different computer) Now, the structure for the database is maintained by mangos and modified when necessary, but putting actual information in (the creature data, teleport data, etc) is up to either: database makers (in the case of the world database) or the server itself (in the case of the characters database) or you (realmd database)
3. Scripts fulfill a variety of purposes. These include AIs for bosses, gossip windows (such as guards in capitol cities), dummy spells, etc.
4. W0rld of W4rcraft is based on something called the "client-server architecture". What this means is that all the stuff that has to be available to the players (graphics, sound, controls, etc.) is put into the client. When you run W0W, you are opening up the client. When you login, you are connecting to a "server". The server handles information from many, many clients (tens of thousands) and basically provides all the functionality of the game (when you move your character, the client sends a "move character" packet to the server. The server then updates your character and sends the "move character" packets to everyone around you, and also checks nearby creature AIs for stuff like aggro.)
Although anyone can download and deconstruct the client, the actual server software that handles everything is kept a secret, locked away in a dark tower in a land far away by your favourite game company. Mangos is more or less an attempt to replicate the functionality of this secret software.