Servings/serving sizes are simply an amount that is "customarily consumed". There is no implication about what you should consume, about how much to eat per day, how often, or what part of the meal. It's just about what people tend to eat.
The FDA has put a fair amount of effort into coming up with some sort of guidelines for all this. If you care to see details, you can read this part of the Code of Federal Regulations (Title 21, Part 101, Subpart A, Section 101.12). Essentially, they have amounts for categories of foods, so that ideally if anyone makes a new product, there'll already be an applicable entry in the tables.
But obviously generalizations only work so well. There are foods in any categories where those serving sizes will be unrealistic. There's personal variation. There's variation in how large a part of a snack or meal a given food provides. There are manufacturers trying to make high-fat high-sugar high-calorie food look less bad, and picking serving sizes as low as possible within the guidelines. So you'll frequently find that they're wildly off from the amount that you'd eat for a single snack or single meal, and they'll more likely be too small than too large.
A better way of looking at serving sizes is that they're intended to be of the right order of magnitude, so that you can reasonably easily estimate the nutritional content of the amount you actually eat. For example, if your cereal is in the category with a 30g serving size, and for your particular cereal that's one cup, then whether you eat half a cup or two cups of it, you'll be able to do the math.
So for that purpose, what matters is the rough amount that people tend to eat, hence the notion of "customarily consumed" amounts. That does mean that as you say, "staples" which people tend to eat as a large part of a meal will tend to have larger serving sizes, while things typically eaten as snacks will have smaller serving sizes. But that's not a judgment about how you should eat them, just how people typically do eat them.
The parts of nutrition labels that are intended to provide some guidance about how much they think you should eat are the % daily value column, for the individual nutrients, not the serving sizes. So to see whether your mixed nuts or refried beans are an "appropriate" amount to eat, you have to look more carefully, and possibly adjust for differences between your dietary needs and the generalizations made by the FDA to pick the daily value numbers.
It's not too hard to find things where one serving provides more than the recommended daily intake of some particular nutrient, and it's also not hard to find things where ten servings would be well below the daily value for everything. So the serving size itself definitely doesn't indicate anything about number of servings to eat; it's just a sort of arbitrary but hopefully convenient unit.
That covers most of your numbered questions. As for "what is a cup"... it's a standard measurement. In US stores you should be able to find 1-cup (or fractions/multiples thereof) measuring cups. It's equivalent to 236.6 mL. It's not just the contents of any arbitrary cup, so the measuring cup that comes with your rice cooker is probably not the same - likely 180 mL.