Some would struggle through their meal and say nothing - at least to the restaurateur. They would wait until they'd left the restaurant and willingly moan about their badly-cooked meal to others, but not return for another meal. For a restaurant, that can obviously have a detrimental effect on trade; a local restaurant with a bad reputation is doomed. Recommendations are invaluable, but the opposite can be disastrous.
Other diners would complain when they'd finished their meal, which, in reality, is too late. They'd struggle through their suspect fish and wonder why it tasted 'strange'. If the food isn't good, why eat it? Surely, the time to notify the waiter or manager is as soon as you realise that your meal isn't as expected. Then, the staff have a chance to make amends.
If you go into a shop and buy a product that doesn't work, you'd probably return it and want an exchange or refund. Many don't expect that from a restaurant and I wonder why not. You order a meal and, in essence, make a contract with the restaurant to provide it in good condition. As a simple example, if you order a rare steak and it's well-done, you should be able to send it back to the kitchen. Unfortunately, if you do, and it's replaced, your fellow diners will have finished their course before you begin. They may feel uncomfortable eating while you wait, and you won't want to be eating when they've finished. It can affect the mood of an evening, so is not ideal. That, I think, is why some people say nothing.
The reaction of a restaurant to a complaint is important to the way you'll feel afterwards. If you're not charged, and perhaps given a drink as compensation, you may forgive the error and try the establishment again. If, however, the waiter shrugs and does nothing, you'll have no hesitation in telling your friends how badly you were treated. I was told of a diner who found something with legs in his paella and was blatantly told by the waiter that it was fennel! Staff should be trained to deal with a complaint. I've seen both good and bad reactions, and more diners talk about the latter than the former.
I live in an area where there are numerous restaurants of various qualities. There are those offering the typical 'menú del día' at a low price, and places where 'fine dining' would be the best way to describe the meal. Whichever your choice, you should expect your food to be edible and of a standard comparable to the price charged. If the meal is good, why not make a point of complimenting the staff? And if it's not; whilst we may accept that mistakes are occasionally made, we shouldn't expect to pay for them.