this is actually more of a programming question, and it relates to C, not specifically AVR studio. BUT:
Source files (*.c, *.cpp) contain the actual control code. When people talk about "writing code", they write source files to actually DO things.
Headers: Header files contain helper code that, on its own, doesn't do anything. For example, a robot might use a structure of variables, call it "speedStruct", that contains the speeds of all the motors. This might be used in multiple source files, so it makes a lot of sense to define it in one place then use it in multiple places. Headers let you do that.
Headers do a lot more, though, and it's hard to go into in a forum post (read a C book!). For example, in C, if you have a function, you have to declare the function to the code -- you have to tell the computer that your program has a specific piece of functionality. Headers are used to declare the functions so all of your code can use it.
I'm not sure what you mean by "external files" and "other files". Do you mean the libraries?