Stop in for a cup of coffee

Ok here in the Midwest we don't use the word, Diner. To better understand I'm thinking a Diner is like our small town locally owned restaurants??
Think the term started when they used to be in railroad diner cars.