All these onions vary slightly in flavor, texture, and color, but can usually be substituted for one another. In terms of cooking, they will all behave the same in the pan.
When buying onions, go for ones that feel heavy in your hand and firm. Avoid soft onions or ones that have a sharp oniony odor before peeling. These are indications that the onion is old. Except for sweet onions, all these onions can be stored for several weeks in a cool, dark pantry or cupboard.