Also sometimes I see the ".h" portion
included and sometimes I don't (example: #include <vector>). What's
the difference?
The difference is just the naming convention. Another one you might
find is ".hpp". Under the hood they are all the same thing, headers.
Most likely they are the name of header files sitting on your machine
somewhere.
The C standard library has a lot of header files ending in .h, e.g.
<stdlib.h>. When early C++ compilers incorporated the C standard
library, the easiest thing to do was to keep the same naming
conventions. So in a C program you would #include <stdlib.h>, and in
a C++ program you would #include <stdlib.h> to do the same thing.
Some features that were not part of C were also added to C++, such as
vectors, and early compilers might have used <vector.h> or <vector>.
When C++ was standardized, they decided to put the functionality of
<stdlib.h> into what C++ called <cstdlib>, similarly <assert.h> became
<cassert>, etc. The library features that were new with C++ were also
standardized, with header names that lacked the .h (e.g. <vector>,
<fstream>, etc). In addition, the functionality of the standard
library via these headers was mostly put into the namespace std.
Finally, support for the old C style headers (<stdlib.h>) was kept.
As it happens, adoption of the standardized header naming and
namespace placement by different compilers happened at different times
and sometimes incrementally between releases of a compiler. Some
compilers just know about the C name <stdlib.h>, some will offer both
C and C++ name (stdlib.h or cstdlib). In addition, some compilers put
the contents of into the std namespace, where some did not. In
recognition of this problem, in C++0x, they are specifying that it is
up the implementation if they put the function in just the std
namespace or both the std and global namespace.
So when reading code that uses functionality from the C library, you
might see either the C style name (e.g. <math.h>) or the C++ style
name (<cmath>). In addition, it may or may not be using the std
namespace. When writing code, it is probably best to use the C++
style name and assume that things are in the std namespace.
Another little thing, C and C++ have distinct string concepts. The C
style name for the C string concept is <string.h>. The C++ style name
for the C string is <cstring>. The C++ name for the C++ string is
<string> (there is no C style name for the C++ string).