Energy regenerates automatically. c: You get 1 energy point per every 24 minutes that pass. You can buy an energy drink in the premium shop if you want to instantly restore all of your pet's energy, otherwise, it takes 4 full hours to fill up the energy bar of any single pet.
As for food, pets are fed automatically, so just keep the food in your inventory. If you run out of food, though, you'll have to start paying money. As per the FAQ under the Help tab:
"Each day your pet will eat 18 pounds of food (the food type depends on the pet's diet). If you have the food on your Inventory, your pets will eat this food. If you don't have stored food, you will pay 1 for each food pound. In total, you need to pay up to 18 for each pet per day.
The food/coins will be used for feeding only if you have logged in this day. You can go on holidays or simply rest from the game without being worried about your game balance.
If you don't have enough food or coins to feed your pets, the Pound will take away 1 pet each day until you start to feed your pets properly."