extern
extern is overloaded for several uses. For global variables, it means that it is declaring the variable, not defining it. This is useful for putting global variables in headers. If you put this in a header:
int someInteger;
Each .cpp file that includes that header would try to have its own someInteger. That will cause a linker error. By declaring it with extern, all you're saying is that there will be a someInteger somewhere in the code:
extern int someInteger;
Now, in a .cpp file, you can define int someInteger, so that there will be exactly one copy of it.
There is also extern "C", which is used for specifying that certain functions use C-linkage rules rather than C++. This is useful for interfacing with libraries and code compiled as C.
In C++0x, there will also be extern template declarations. These are the opposite of explicit template instantiation. When you do this:
template class std::vector<int>;
You're telling the compiler to instantiate this template right now. Normally, the instantiation is delayed until the first use of the template. In C++0x, you can say:
extern template class std::vector<int>;
This tells the compiler not to instantiate this template in this .cpp file, ever. That way, you can control where templates are instantiated. Judicious use of this can substantially improve compile times.
explicit
This is used to prevent automatic conversions of types. If you have a class ClassName with the following constructor:
ClassName(int someInteger);
This means that if you have a function that takes a ClassName, the user can call it with an int, and the conversion will be done automatically.
void SomeFunc(const ClassName &className);
SomeFunc(3);
That's legal, because ClassName has a conversion constructor that takes an integer. This is how functions that take std::string can also take a char*; std::string has a constructor that takes a char*.
However, most of the time you don't want implicit conversions like this. You only usually want conversions to be explicit. Yes, it's sometimes useful as with std::string, but you need a way to turn it off for conversions that are inappropriate. Enter explicit:
explicit ClassName(int someInteger);
This will prevent implicit conversions. You can still use SomeFunc(ClassName(3)); but SomeFunc(3) will no longer work.
BTW: if explicit is rare for you, then you're not using it nearly enough. You should use it at all times, unless you specifically want conversion. Which is not that often.
volatile
This prevents certain useful optimizations. Normally, if you have a variable, C/C++ will assume that it's contents will only change if it explicitly changes them. So if you declare a int someInteger; as a global variable, C/C++ compilers can cache the value locally and not constantly access the value every time you use it.
Sometimes, you want to stop this. In those cases, you use volatile; this prevents those optimizations.
register
This is just a hint. It tells the compiler to try to put the variable's data in a register. It's essentially unnecessary; compilers are better than you are at deciding what should and should not be a register.