stdafx.h is commonly used in Microsoft Windows projects as the name of a file which describes include files (both standard system include files and project specific include files) that are used frequently but are changed infrequently. Since many C/C++ source files for Windows programs include stdafx.h, making small changes in it means the entire project needs to be recompiled and small errors in it cause large errors in the rest of the project.
Compatible compilers (for example, Visual C++ 6.0 and newer) will precompile this file to reduce overall compile times. Visual C++ will also not compile anything before the #include "stdafx.h" in the source file, unless you uncheck the compile option /Yu'stdafx.h': it assumes all code in your source up to and including that line is already compiled.
The AFX in stdafx.h stands for Application Framework eXtensions. AFX was the original abbreviation for the Microsoft Foundation Classes (MFC). This type of file can also have alternate names, including "StdInclude.h".