The key? If the reservationist (an increasingly rare creature separated from you by long phone delays during which you can listen to musical selections ranking about 300 on the Top 40 list) tells you the flight you're about to purchase is a "codeshare" flight, listen closely when he or she tells you the vital information about "who is operating the flight." If you buy over the Internet (which is what the airlines want you to do), look very closely to see who's really flying the plane. The shorthand version? If Hotwings is flying the aircraft, go to the Hotwings counter, regardless of which airline sold you the ticket.
Confused? There are passengers by the hundreds (I'm being charitable here) confused by this every day.
So why do we passengers put up with it? Two reasons.
First, codesharing effectively merges your frequent flyer miles and programs, letting you use your built-up mileage from one carrier on several others (even though this can be even more confusing because each carrier "group" has its own rules and myriad exceptions).
Second, we put up with it because, thanks to Congress deciding back in 1978 that the airline industry is NOT a vital public service that should be regulated at least to a minimal degree, airline managements have to come up with any innovation they can to stay afloat in this Wild West version of competition. Codeshares add at least some profit to the industry's sorely strained bottom line.
The airline industry argues that codesharing provides customer convenience because you can pretend to stick with your favorite airline yet fly on many others, but you'd be hard-pressed to find a groundswell of public enthusiasm for the practice. Until it evolves into the next stage, however, (mergers, acquisitions and massive global carriers with little loyalty to the United States), the best way to handle it is by asking careful questions before you buy, and knowing whose counter to head for.