Start Synaptic. Search for cups. I usually make sure that cups, hpijs,
and gutenprint are installed. At that point, every hp printer I have
connected has been autodetected. By the way, which version of Ubuntu are
you using and what is the model of hp printer?