That error message usually means that the game is using a 16 bit executable, which won't work in 64 bit Windows. At that point your only real options for playing that game is to either set up a dual boot with your system, and have a 32 bit version of Windows as a secondary OS for your old games, or run a 32 bit version of Windows in a Virtual Machine, using something like VirtualBox or VMWare Player. Note that the second option will only really work if the game doesn't require 3D acceleration.
Also, with some Windows 95 era games, the installer would be 16 bit, but the game itself would be 32 bit, meaning the game might work on Windows 7, but the trick is getting it to install. In that case, you may have to search around and see if a fan has written a new 32 bit installer for the particular game you are trying to play.
If the old games are being sold on Good Old Games or Steam, or another digital distributor, rebuying the title might be an option, as they might have patched the game to work on newer operating systems. (not guaranteed, research heavily before trying this option).