It's called an include guard. It prevents errors if the header is included multiple times in the same source file.
1 2 3 4 5 6 7
#ifndef __temp_h__ // if '__temp_h__ isn't already defined...
#define __temp_h__ // ...then define it
// .. and compile the stuff in the header
#endif // if __temp_h__ *was* already defined, the compiler skips to here
// ie: it skips over the entire header
Example:
1 2 3 4 5 6 7 8
// main.cpp
#include "temp.h" // first time it's #included, so __temp_h__ was not
// defined yet. The header will be compiled normally and now __temp_h__ has
// been defined
#include "temp.h" // __temp_h__ has already been defined, so this time
// the header is skipped over