You can download the Windows 8 installation disc from the Microsoft website. You will need to know the serial key from your original purchase in order to install it. The key should be either on the invoice/receipt in your emails or in the purchased software bit of your Microsoft account.
The installation will have to be a completely fresh install so back up your files before doing this!
You cannot install Windows 7 without purchasing a Windows 7 license key, these are quite rare to get for consumers now.