Underneath the energy bar will be a grayish-blue rectangle with an image of that companions corresponding food item. Next to the image will be a number representing how many of that item that companion currently has.
Click the blue "Feed" button underneath.
A pop up will appear with a slider on it.
Click and drag the slider to determine how much food you want that companion to have.
"Inventory" means it will be in your inventory, "Companion Stock" means it will be in the companions inventory. Companions can only eat from their personal stock.
Click the "Feed" button on the pop up to confirm your choice. Click the "Cancel" button or the blue "X" in the top left corner of the pop up to return to the companion page.
A well fed companion will gain affection each day and its energy points will reset. A malnourished companion will lose 20 energy points every day. Once their energy points have completely run out, their affection level will go down by 10% until it reaches zero. At that point, the companion will return to its egg.