Global variables are regular variables that exist in a program. You have to write code to change the value of the variable. Even if they're in two different .c files, you have to somewhere, in 1.c or 2.c, do something like a = 42; to change it's value. Whatever it is that you do, you did it, in your program.
The volatile keyword means something outside your program may change the value of your variable. This is commonly used for lower level programming and embedded systems, when you have memory-mapped variables that correspond to hardware registers. An external interrupt, serial data, A/D converter, etc may change the value of that variable, so that between the following code could print any number:
Code:
volatile int x;
x = 42;
printf("%d", x); // could print 17 or any other number if the value of x was changed externally
Also, volatile variables can't really be optimized by the compiler. Since the value may be changed by something other than your program, the compiler can never make any assumptions about it's value or usage, thus can't make any decisions to optimize.