H-P's utility for printers is
HPLIP; see
http://hplipopensource.com/hplip-web/index.html (there are instructions for installing, setting up and using it). You may be able to download
HPLIP from Ubuntu's service -- check and see.
HPLIP provides the printer "model;" i.e., all the capabilities and options for the printer, to
CUPS which is the actual printing system. You use
HPLIP to set up your printer connection and printer type and
HPLIP make the
CUPS connection for you -- read and follow the step-by-step instructions at the link above and you probably won't have any problems. Note that
HPLIP must be installed as root, so you either need to be logged in as root or use
sudo.
Hope this helps some.