Basically, as others have said, anything you can eat standing up or take away is relatively cheap. You can find pizza and panini of course, but also all sorts of fried items, fruits and vegetables from the markets, prepared foods in some supermarkets, and of course going to the supermarkets for soft drinks, water, even beer and wine. Even in the tourist areas, you can head off a side street and find small shops selling food and drink much cheaper, and usually better, than the beaten.
As for your main meal (it could be the traditional late lunch or a dinner) I long ago decided that spending well (not just expensive) is well worth it in Italy. The pastas are cheap, you can add side dishes (contorni) of vegetables and anti pasti to round out a meal. Fish and Meat can get expensive, but there is so much more. Again, finding a smaller out of the way place will be half that as a restaurant on the Piazza. My wife and I usually get one or two antipasti dishes, each a Primi or Secondi plate, then a contorni and maybe a carafe of house wine...more food than we want or maybe need.