Where do locals actually eat in Bologna?
Locals eat where the menu is short, seasonal and in Italian — small osterie and trattorie a few streets off Piazza Maggiore, not the tourist spots on the main drag.

The short version: eat where the menu is short, seasonal and written in Italian. A four-language laminated menu with photos outside a restaurant on Bologna's main square is a reliable warning sign.
How do you tell a tourist trap from a real osteria?
Three quick tells, in order of reliability: the menu changes (chalkboard, not laminated), the room is full of people speaking Italian, and the pasta list is short because it's made that morning.
What should you order the first time?
Tagliatelle al ragù, tortellini in brodo, and a board of mortadella and Parmigiano. These are the dishes Bologna is built on, and a kitchen that does them well does everything well.
When should you go?
Lunch from 12:30, dinner from 20:00. Reserve for dinner — the good rooms are small and fill with regulars.