ok, so you have taken out the existing 4gb HDD and put in a 40gig? what you need to do is change the boot sequence in the bios (press del, when it posts)
its usually in a section called somthing like this....
Once you have located the boot sequence options (may be listed as first boot device, second boot...ect) you need to set your CD ROM drive as the first boot device.
Then save changes and restart with your windows CD in and it should automatically run or it may say press any key to boot from CD ROM. Then it is just a case of formatting the drive and installing windows which is all done from the CD menu.