You have to have a driver loaded that supports the card. That is step one. Once the correct driver is loaded, then you need to configure the connection.
Have a look at the command 'lspci' and take note of the card you want to make work. Then do some googling to find out what driver you need.
Ubuntu has drivers for the most common cards. If there is no linux driver, you can try and use the windoze driver with ndiswrapper. Once again, do some googling, read about ndiswrapper. It will be in the repos for ubuntu. Try to find a linux driver first, they will work better than the windbloze + ndiswrapper.
Have you used the wireless manager to try and configure the card? If not, start there, there driver may be loaded.
How do you connect in windoze? DHCP? if yes, try that first. If you have your router configured for encryption, that will have to be the same in linux.
If you are totally stuck, post some useful information. We would need the output of 'lspci' and 'lsmod' as a starting point. The specific model of HP would help. You can also look at the device mangler in windbloze to find out what card you have.