Bread was specially baked for that purpose. After the meal, sometimes the bread was consumed, and sometimes given to the dogs. The closed sandwich has its origins in the 18th century, but that's a different story. Cheese itself dates back to prehistoric times and was probably discovered by accidental fermentation. Mozzarella, a soft, fresh cheese traditionally made from the milk of water buffalo, originated in 15th century Naples.
Mozzarella nowadays is made from cow's milk.
Initially Europeans regarded the tomato with suspicion and fear. It had a strange texture, was too acidic to eat green, and looked spoiled when ripe. It disintegrated when cooked, and was even suspected of being poisonous. But eventually it caught on. New plants from America arrived in Iberia and spread throughout the Mediterranean.