Your Support CD or software might be outdated and because of that you cannot install it in Windows 8. However, HP took all the necessary steps to update the drivers for Windows 8. Visit HP Support then select your version of Windows 8 (32- or 64-bit) and then expand the Driver - Product Installation Software. Download it and launch the setup package from the location you saved it. The whole download might take a while since it's size is big (~300 MB). Launch the setup as Administrator using Run as Administrator then follow the instructions. The installer will ask you to plug the printer at some point. Make sure the printer is turned on and ready to print.
When the process is finished, the printer will be ready for use and you will be able to use the installed software to print or scan.