It's true that the distinction exists, but by now it's become pretty blurred - what you should really do is just look at the atmosphere and the average price of the dishes, because that's where you actually understand what you're about to find. A real trattoria comes from home cooking, less rigid, with dishes that change by season and local ingredients, while a restaurant tends to have a more stable and structured offering; the thing is though that a lot of modern places call themselves a trattoria precisely because they want that welcoming, anti-snob vibe, regardless of how sophisticated the menu actually is.
The only real practical difference you'll notice is in the service: in a trattoria the waiter chats with you, they don't pester you about water, and if you don't like something they'll tell you straight up, whereas at a restaurant everything is more formal. But if the place has a family-friendly atmosphere and people eat well there, call it whatever you want - the substance is what counts.