Open your backpack in the bottom right corner of the screen. Everything in there is fair game — items you bought, or things you picked from a bush or tree while exploring.
Drag the food onto your Petpet. If it worked, your companion does a little chewing animation and a happy dance. If nothing happens, the item is probably not edible or your Petpet is already full, so try something else from the bag.