I see so many kids that are totally out of control and the parents somehow think the kid will "just know" how to behave in a situation where they need to sit still and be quiet. They don't, and everyone else pays the price.
My kids learned from experience. We started taking them to restaurants with Grandma and Grandpa after they were about a month old, and I did A LOT of parking lot sitting and walking with them when they decided to try the whole "loud/squirmy" thing. They learned pretty quickly that behaving meant being gushed over by Grandma, and being even a little loud meant sitting outside in a parking lot with boring old mom. Instant "Well Behaved Kid".
I've even been on road trips between the north part of Los Angeles to San Felipe, Mexico with them, and they were pretty damn good.