Make sure that you have the latest version of iTunes and iOS 2.0 or higher. Your HP printer and iPhone should be connected to the same Network.
Now open App store on your iPhone, search for “HP iPrint” App. Install the APP and once it is installed tap on the icon to open it. Once the app is opened, it will automatically open your photos library. Make sure that the app has been properly installed without any issues. If it doesn't for some reason install properly then you can always reinstall the app properly.
You can select photos from from existing libraries or you can also take a new photo by taping on the camera icon shown on upper right hand side. Once you are done with selecting a photo, a new window will pop up.
Here you can see two more options, "Print" and right above the print option you can see your printer listed. If you have more than one HP printers in network, you can select any one of them by tapping on your printer name. Now you can see all the available printers in the network, select your desired printer and enjoy printing your photos.
If you face any difficulties then you can always go online and find help at various websites or forums that deal with issues for iPhones or HP printers. You will find various different help sections that you can refer to if you are having any issues. Remember if you do not find what you are looking for then you can always post your own question on a popular forum online and hopefully you will get the response that you need.