The campfire requires that you place a flammable resource in its inventory. Place a stack of wood into the same inventory you are putting the food you wish to cook. You will then be able to activate the fire by pressing the action button. 'E' in the case of PC users.