Use DOSBox. Some games may need an unofficial build in order to work correctly.
These games will never run natively on 64-bit versions of Windows. Some games can be run using winevdm for Windows or win3mu. Other solutions include dual booting and virtualization.
The solution for 64-bit versions of Windows varies depending on how the installer works. Pre-made solutions are available for many games (see the individual game pages for details).
Some games include the complete game folder on the CD rather than having it compressed into an installer archive. Simply copying this folder may be enough to have a working installation of the game.
InstallShield games include _inst32i.ex_ in the installation files. Use InstallShield Wrapper or replace with a 32-bit setup executable (InstallShield 2, InstallShield 3, InstallShield 5).
Some single-file installers can be extracted using Universal Extractor.
If all else fails the game will need to be installed on a 32-bit version of Windows and then copied to the 64-bit system. Some games need registry keys to work correctly so those may need to be copied over as well.
This error may occur if physical media is damaged or cannot be read easily. Try manually copying the installation files from all discs to the hard drive and then running the installer from there.
For some DOS games in DOSBox it is necessary to specify an amount of free space as part of the mount command, e.g. MOUNT C C:\DOSGAMES -freesize 1024. See the DOSBox MOUNT documentation for further details.
MOUNT C C:\DOSGAMES -freesize 1024