What is your current cpu and motherboard? You can download cpu-z and get the specs from there if you don't know. http://www.cpuid.com/softwares/cpu-z.html
the download link's are on the right hand side of the page.
The Compaq/HP are often custom builds and very limited in terms of upgrades.
Tthe model number and a nice trip through the HP support website may yield the right info.
If you can get the motherboard specs from the HP website, you may then be able to find out possible upgrades from the manufacturer of the motherboard.
The other way would be to look for the part number on the motherboard and try google to identify it.