Generally, I tend to find checking reviews on websites such as Yelp and TripAdvisor can be somewhat reliable, especially if there are many reviews for a place, increasingly the statistical likelihood of the score meaning something. Of course, you need some kind of smartphone to do that on the spot.
Another good approach, especially if you are staying in a fancy hotel, is to ask the concierge (although you do normally need to do this before leaving the hotel, admittedly). It's their job to know the city, and their tip depends on the result. They should be able to find you somewhere "not touristy" if you want, and can often even get you a table and a restaurant that's otherwise booked out.
At the other end of the scale, there are some red flags that suggest you might want to avoid a restaurant (of course there are always exceptions to these rules, so they aren't hard and fast):
- Menus in English (if that's not the local language, of course) - they are likely catering to tourists, which can be a sign of overpriced and underquality food.
- Restaurants in hotels, especially mid-range or cheap hotels - some five-star or fancy hotels might have good restaurants, but even if the food is good, it will typically be overpriced due to the captive market. Often better to get outside your hotel.