Printing from an iPhone
To use an AirPrint printer the iPhone/iPad/iPod needs to be connected to the same local network that the printer is connected to. The printer can be connected via wifi or an Ethernet connection that connects to your wifi network.

If the iOS device is connected via the phone mobile data network then it can't print to using AirPrint.

Why is your iPhone not connected to the wifi network? Is it because you are trying to print to the printer when away from home? Or is it because you have a large property and you are out of range of your wifi network?

While you can't use the native AirPrint when not connected to your home wifi, you can use  HP's ePrint service. This works by your printer having its own email address. You can email documents to the printer that it then prints.

The service is somewhat limited when compared to AirPrint, as you need to be able to get whatever you are printing into a document and be able to email it. So many apps that support AirPrint can't be printed from using ePrint.